{
  "info": {
    "_postman_id": "f42f7619-f3ec-4e3d-823a-d90a1ac8bfdc",
    "name": "Протокол 1.4 Медицинское освидетельствование",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "_exporter_id": "37937048"
  },
  "item": [
    {
      "name": "предварительные условия",
      "item": [
        {
          "name": "импорт пакета медицинской информации",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "pm.test(\"Валидный бандл должен отработать со статусом 202\", function () {\r",
                  "    pm.response.to.have.status(202);\r",
                  "});\r",
                  "\r",
                  "var jsonData = pm.response.json();\r",
                  "let bundleId = jsonData.parameter.find(obj => obj.name === \"ResourceId\").valueString;\r",
                  "let statusReference = jsonData.parameter.find(obj => obj.name === \"OperationStatusReference\");\r",
                  "\r",
                  "console.log(statusReference.valueReference.reference);\r",
                  "\r",
                  "pm.collectionVariables.set(\"bundleId\", bundleId);\r",
                  "pm.collectionVariables.set(\"StatusUrl\", statusReference.valueReference.reference);\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            },
            {
              "listen": "prerequest",
              "script": {
                "exec": [
                  "// const iehrTools = pm.require('@grey-escape-331258/iehr-tools');\r",
                  "\r",
                  "// var requestdata = JSON.parse(pm.request.body.raw);\r",
                  "// let patient = requestdata.entry.find(obj => obj.resource.resourceType === \"Patient\").resource;\r",
                  "// let composition = requestdata.entry.filter(obj => obj.resource.resourceType === \"Composition\")[0].resource;\r",
                  "\r",
                  "// let actualDate = new Date(Date.parse(composition.date.substr(0, 7)));\r",
                  "// let actualDateStart = iehrTools.addMonth(actualDate, -1);\r",
                  "// let actualDateEnd = iehrTools.addMonth(actualDate, 1);\r",
                  "\r",
                  "// pm.collectionVariables.set(\"actualDateStart\", actualDateStart.toISOString().substring(0,7));\r",
                  "// pm.collectionVariables.set(\"actualDateEnd\", actualDateEnd.toISOString().substring(0,7));\r",
                  "// pm.collectionVariables.set(\"actualDate\", actualDate.toISOString().substring(0,10));\r",
                  "// // --- Patient ----\r",
                  "// let patientName = patient.name[0].family;\r",
                  "// let patientDate = patient.birthDate;\r",
                  "// let patientAddress = patient.address[0];\r",
                  "// let patientIdentifier = patient.identifier[0];\r",
                  "\r",
                  "// console.log(pm.request.auth)\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Fhir-By-Version",
                "value": "active",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\r\n    \"resourceType\": \"Bundle\",\r\n    \"id\": \"ExampleBundleForDemo\",\r\n    \"meta\": {\r\n        \"profile\": [\r\n            \"https://fhir.by/AbstractArea/StructureDefinition/Bundle/MedicationDocument\"\r\n        ]\r\n    },\r\n    \"identifier\": {\r\n        \"system\": \"urn:ietf:rfc:3986\",\r\n        \"value\": \"{{$guid}}\"\r\n    },\r\n    \"type\": \"document\",\r\n    \"timestamp\": \"2024-07-22T11:12:21Z\",\r\n    \"entry\": [\r\n        {\r\n            \"fullUrl\": \"Composition/CompDocumentForDemo\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Composition\",\r\n                \"id\": \"{{$guid}}\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/CompDocument\"\r\n                    ]\r\n                },\r\n                \"status\": \"final\",\r\n                \"type\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/CompositionType\",\r\n                            \"code\": \"general\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": [\r\n                    {\r\n                        \"reference\": \"Patient/Patient1\",\r\n                        \"display\": \"Ивийич\"\r\n                    }\r\n                ],\r\n                \"date\": \"2024-07-22T11:12:21Z\",\r\n                \"author\": [\r\n                    {\r\n                        \"reference\": \"Practitioner/{{PractitionerId}}\",\r\n                        \"display\": \"Фч\"\r\n                    }\r\n                ],\r\n                \"title\": \"Discharge Summary\",\r\n                \"custodian\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                }\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Patient/Patient1\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Patient\",\r\n                \"id\": \"pa-a8fea7ba-c477-11f0-a1a9-c890c671c345\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/PatientWithIdentificationNumber\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/IncapacityExtension\",\r\n                        \"valueBoolean\": true\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DisabilityGroup\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/DisabilityGroup\",\r\n                                    \"version\": \"1.42\",\r\n                                    \"code\": \"2_group\",\r\n                                    \"display\": \"II группа\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DisabilityReason\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/DisabilityReason\",\r\n                                    \"version\": \"1.1\",\r\n                                    \"code\": \"general\",\r\n                                    \"display\": \"общее заболевание\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobProfession\",\r\n                                \"valueString\": \"Инспектор по контролю за содержанием и охране зеленых насаждений\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobProfessionCode\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/SpecialtyProfPerson\",\r\n                                            \"version\": \"1.1\",\r\n                                            \"code\": \"3119-007\",\r\n                                            \"display\": \"Инспектор по контролю за содержанием и охране зеленых насаждений\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobPlace\",\r\n                                \"valueString\": \"УП «Зеленстрой»\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/TermOFWork\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2020-11-07\"\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/MainJobPlace\",\r\n                                \"valueBoolean\": true\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientJob\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataBoolean\",\r\n                                \"valueBoolean\": true\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataPeriod\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2025-01-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalData\"\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"version\": \"1.284\",\r\n                                    \"code\": \"INP\",\r\n                                    \"display\": \"Уникальный идентификационный номер\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"7551027A009PB6\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedString\",\r\n                                        \"valueString\": \"Центральным РУВД г Минска, 21.08.2021\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedDate\",\r\n                                        \"valueDate\": \"2021-08-21\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedCode\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/OCAM\",\r\n                                                    \"version\": \"1.3\",\r\n                                                    \"code\": \"710\",\r\n                                                    \"display\": \"Центральное РУВД г.Минска\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PassportIssued\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"version\": \"1.284\",\r\n                                    \"code\": \"Passport-RB\",\r\n                                    \"display\": \"Паспорт гражданина Республики Беларусь\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"MP2334561\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedDate\",\r\n                                        \"valueDate\": \"2024-03-01\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedString\",\r\n                                        \"valueString\": \"Центральным МРЭК г Минска, 31.01.2024\"\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PassportIssued\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"official\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"version\": \"1.284\",\r\n                                    \"code\": \"CDP\",\r\n                                    \"display\": \"Удостоверение инвалида\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"Серия 09 №1234562\",\r\n                        \"period\": {\r\n                            \"start\": \"2024-02-15\"\r\n                        },\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/af69999d-3e5c-49b9-a9e9-38e7687785f3\",\r\n                            \"display\": \"Учреждение здравоохранения \\\"Минская городская медико-реабилитационная экспертная комиссия\\\"\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedDate\",\r\n                                        \"valueDate\": \"1990-12-31\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedString\",\r\n                                        \"valueString\": \"Октябрьское РУВД г.Минска\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedCode\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/OCAM\",\r\n                                                    \"version\": \"1.3\",\r\n                                                    \"code\": \"705\",\r\n                                                    \"display\": \"Октябрьское РУВД г.Минска\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PassportIssued\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"version\": \"1.284\",\r\n                                    \"code\": \"BC\",\r\n                                    \"display\": \"Свидетельство о рождении\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"АВ7654322\"\r\n                    }\r\n                ],\r\n                \"active\": true,\r\n                \"name\": [\r\n                    {\r\n                        \"family\": \"Иванов\",\r\n                        \"given\": [\r\n                            \"Петр\",\r\n                            \"Сидорович\"\r\n                        ]\r\n                    }\r\n                ],\r\n                \"telecom\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientNotificationType\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/PatientNotificationType\",\r\n                                                    \"version\": \"1.39\",\r\n                                                    \"code\": \"SMS\",\r\n                                                    \"display\": \"SMS\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientNotificationType\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/PatientNotificationType\",\r\n                                                    \"version\": \"1.39\",\r\n                                                    \"code\": \"messenger-tel\",\r\n                                                    \"display\": \"Telegram\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientNotificationType\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/PatientNotificationType\",\r\n                                                    \"version\": \"1.39\",\r\n                                                    \"code\": \"e-mail\",\r\n                                                    \"display\": \"e-mail\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientConsentForNotification\",\r\n                                        \"valueBoolean\": true\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientAccountPoint\",\r\n                                        \"valueBoolean\": true\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientTelecomPurpose\"\r\n                            }\r\n                        ],\r\n                        \"system\": \"phone\",\r\n                        \"value\": \"295748410\"\r\n                    },\r\n                    {\r\n                        \"system\": \"email\",\r\n                        \"value\": \"test_mail@gmail.by\"\r\n                    }\r\n                ],\r\n                \"gender\": \"male\",\r\n                \"birthDate\": \"1990-12-31\",\r\n                \"deceasedBoolean\": false,\r\n                \"address\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"version\": \"1.51\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"version\": \"1.109\",\r\n                                            \"code\": \"5170309411\",\r\n                                            \"display\": \"Улица Золотая Горка\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 29\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"home\",\r\n                        \"text\": \"г. Минск, Проспект Рокоссовского\",\r\n                        \"line\": [\r\n                            \"Проспект Рокоссовского\"\r\n                        ],\r\n                        \"city\": \"г. Минск\",\r\n                        \"state\": \"г. Минск\",\r\n                        \"country\": \"Беларусь\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"version\": \"1.51\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"version\": \"1.109\",\r\n                                            \"code\": \"51703019678\",\r\n                                            \"display\": \"Проспект Рокоссовского\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 2\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"temp\",\r\n                        \"text\": \"г. Минск, Проспект Рокоссовского\",\r\n                        \"line\": [\r\n                            \"Проспект Рокоссовского\"\r\n                        ],\r\n                        \"city\": \"г. Минск\",\r\n                        \"state\": \"г. Минск\",\r\n                        \"country\": \"Беларусь\"\r\n                    }\r\n                ],\r\n                \"maritalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/MaritalStatus\",\r\n                            \"version\": \"1.1\",\r\n                            \"code\": \"married\",\r\n                            \"display\": \"женат/замужем\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"contact\": [\r\n                    {\r\n                        \"relationship\": [\r\n                            {\r\n                                \"coding\": [\r\n                                    {\r\n                                        \"system\": \"https://fhir.by/ValueSet/RelatedPersonType\",\r\n                                        \"version\": \"1.78\",\r\n                                        \"code\": \"wife\",\r\n                                        \"display\": \"супруга\"\r\n                                    }\r\n                                ]\r\n                            }\r\n                        ],\r\n                        \"name\": {\r\n                            \"family\": \"Иванова\",\r\n                            \"given\": [\r\n                                \"Лариса\",\r\n                                \"Ивановна\"\r\n                            ]\r\n                        },\r\n                        \"telecom\": [\r\n                            {\r\n                                \"system\": \"phone\",\r\n                                \"value\": \"802990990908\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"generalPractitioner\": [\r\n                    {\r\n                        \"reference\": \"Organization/97e05a7d-b923-4b34-bf76-e4b19e248f83\",\r\n                        \"identifier\": {\r\n                            \"value\": \"123156789012\",\r\n                            \"period\": {\r\n                                \"start\": \"2002-12-11\"\r\n                            }\r\n                        },\r\n                        \"display\": \"Учреждение здравоохранения \\\"Бобруйская городская поликлиника № 1\\\"\"\r\n                    }\r\n                ]\r\n            }\r\n        }\r\n    ]\r\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/$import",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "$import"
              ]
            }
          },
          "response": []
        },
        {
          "name": "получение статуса импорта пакета медицинской информации",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  ""
                ],
                "type": "text/javascript",
                "packages": {}
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/{{bundleId}}/$status",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "{{bundleId}}",
                "$status"
              ]
            }
          },
          "response": []
        },
        {
          "name": "поиск пациента по идентификационному номеру",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "var jsonData = pm.response.json();\r",
                  "let patientId = jsonData.entry.find(obj => obj.resource.resourceType === \"Patient\").resource.id;\r",
                  "\r",
                  "pm.collectionVariables.set(\"patientId\", patientId);\r",
                  "console.log(patientId)\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          },
          "request": {
            "method": "GET",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient?identifier=7551027A009PB6",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Patient"
              ],
              "query": [
                {
                  "key": "identifier",
                  "value": "7551027A009PB6"
                }
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Кейс 1. Выдача заключения о наличии/отсутствии ПАВ.",
      "item": [
        {
          "name": "импорт пакета медицинской информации",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "pm.test(\"Валидный бандл должен отработать со статусом 202\", function () {\r",
                  "    pm.response.to.have.status(202);\r",
                  "});\r",
                  "\r",
                  "var jsonData = pm.response.json();\r",
                  "let bundleId = jsonData.parameter.find(obj => obj.name === \"ResourceId\").valueString;\r",
                  "let statusReference = jsonData.parameter.find(obj => obj.name === \"OperationStatusReference\");\r",
                  "\r",
                  "console.log(statusReference.valueReference.reference);\r",
                  "\r",
                  "pm.collectionVariables.set(\"bundleId\", bundleId);\r",
                  "pm.collectionVariables.set(\"StatusUrl\", statusReference.valueReference.reference);\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            },
            {
              "listen": "prerequest",
              "script": {
                "exec": [
                  "// const iehrTools = pm.require('@grey-escape-331258/iehr-tools');\r",
                  "\r",
                  "// var requestdata = JSON.parse(pm.request.body.raw);\r",
                  "// let patient = requestdata.entry.find(obj => obj.resource.resourceType === \"Patient\").resource;\r",
                  "// let composition = requestdata.entry.filter(obj => obj.resource.resourceType === \"Composition\")[0].resource;\r",
                  "\r",
                  "// let actualDate = new Date(Date.parse(composition.date.substr(0, 7)));\r",
                  "// let actualDateStart = iehrTools.addMonth(actualDate, -1);\r",
                  "// let actualDateEnd = iehrTools.addMonth(actualDate, 1);\r",
                  "\r",
                  "// pm.collectionVariables.set(\"actualDateStart\", actualDateStart.toISOString().substring(0,7));\r",
                  "// pm.collectionVariables.set(\"actualDateEnd\", actualDateEnd.toISOString().substring(0,7));\r",
                  "// pm.collectionVariables.set(\"actualDate\", actualDate.toISOString().substring(0,10));\r",
                  "// // --- Patient ----\r",
                  "// let patientName = patient.name[0].family;\r",
                  "// let patientDate = patient.birthDate;\r",
                  "// let patientAddress = patient.address[0];\r",
                  "// let patientIdentifier = patient.identifier[0];\r",
                  "\r",
                  "// console.log(pm.request.auth)\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Fhir-By-Version",
                "value": "active",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\r\n    \"resourceType\": \"Bundle\",\r\n    \"id\": \"ExampleBundleIntoxicationTest\",\r\n    \"meta\": {\r\n        \"profile\": [\r\n            \"https://fhir.by/AbstractArea/StructureDefinition/Bundle/MedicationDocument\"\r\n        ]\r\n    },\r\n    \"identifier\": {\r\n        \"system\": \"https://fhir.by/ValueSet/urn:ietf:rfc:3986\",\r\n        \"value\": \"{{$guid}}\"\r\n    },\r\n    \"type\": \"document\",\r\n    \"timestamp\": \"2025-12-10T14:00:00Z\",\r\n    \"entry\": [\r\n        {\r\n            \"fullUrl\": \"Composition/CompositionIntoxicationTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Composition\",\r\n                \"id\": \"CompositionIntoxicationTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/CompDocument\"\r\n                    ]\r\n                },\r\n                \"status\": \"final\",\r\n                \"type\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/CompositionType\",\r\n                            \"code\": \"general\",\r\n                            \"display\": \"Общая медицинская информация\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": [\r\n                    {\r\n                        \"reference\": \"Patient/PatientTest\"\r\n                    }\r\n                ],\r\n                \"date\": \"2025-12-10T14:00:00Z\",\r\n                \"author\": [\r\n                    {\r\n                        \"reference\": \"Practitioner/{{PractitionerId}}\"\r\n                    }\r\n                ],\r\n                \"title\": \"CompDocument для наполненного Bundle для заключения, подтверждающий отсутствие (наличие) состояния, вызванного потреблением ПАВ\",\r\n                \"custodian\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                },\r\n                \"event\": [\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"ClinicalImpression/ExampleSubstanceIntoxicationTest\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"DiagnosticReport/ExampleDiagnosticReportLabAlcoTest\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"DiagnosticReport/ExampleDiagnosticReportLabOpiumTest\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"Observation/ExampleKdlObservationAlcoTest\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"Observation/ExampleKdlObservationOpiumTest\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Patient/PatientTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Patient\",\r\n                \"id\": \"PatientTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/PatientWithIdentificationNumber\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/IncapacityExtension\",\r\n                        \"valueBoolean\": true\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DisabilityGroup\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/DisabilityGroup\",\r\n                                    \"code\": \"2_group\",\r\n                                    \"display\": \"II группа\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DisabilityReason\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/DisabilityReason\",\r\n                                    \"code\": \"general\",\r\n                                    \"display\": \"общее заболевание\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobProfession\",\r\n                                \"valueString\": \"Инспектор по контролю за содержанием и охране зеленых насаждений\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobProfessionCode\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/SpecialtyProfPerson\",\r\n                                            \"code\": \"3119-007\",\r\n                                            \"display\": \"Инспектор по контролю за содержанием и охране зеленых насаждений\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobPlace\",\r\n                                \"valueString\": \"УП «Зеленстрой»\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/TermOFWork\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2020-11-07\"\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/MainJobPlace\",\r\n                                \"valueBoolean\": true\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientJob\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataBoolean\",\r\n                                \"valueBoolean\": true\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataPeriod\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2025-01-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalData\"\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"INP\",\r\n                                    \"display\": \"Уникальный идентификационный номер\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"7551027A009PB6\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedString\",\r\n                                        \"valueString\": \"Центральным РУВД г Минска, 21.08.2021\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedDate\",\r\n                                        \"valueDate\": \"2021-08-21\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedCode\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/OCAM\",\r\n                                                    \"code\": \"710\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PassportIssued\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"Passport-RB\",\r\n                                    \"display\": \"Паспорт гражданина Республики Беларусь\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"MP2334561\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedDate\",\r\n                                        \"valueDate\": \"2024-03-01\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedString\",\r\n                                        \"valueString\": \"Центральным МРЭК г Минска, 31.01.2024\"\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PassportIssued\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"official\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"CDP\",\r\n                                    \"display\": \"Удостоверение инвалида\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"Серия 09 №1234562\",\r\n                        \"period\": {\r\n                            \"start\": \"2024-02-15\"\r\n                        },\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedDate\",\r\n                                        \"valueDate\": \"1990-12-31\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedString\",\r\n                                        \"valueString\": \"Октябрьское РУВД г.Минска\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedCode\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/OCAM\",\r\n                                                    \"code\": \"705\",\r\n                                                    \"display\": \"Октябрьское РУВД г.Минска\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PassportIssued\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"BC\",\r\n                                    \"display\": \"Свидетельство о рождении\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"АВ7654322\"\r\n                    }\r\n                ],\r\n                \"active\": true,\r\n                \"name\": [\r\n                    {\r\n                        \"family\": \"Иванов\",\r\n                        \"given\": [\r\n                            \"Петр\",\r\n                            \"Сидорович\"\r\n                        ]\r\n                    }\r\n                ],\r\n                \"telecom\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientNotificationType\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/PatientNotificationType\",\r\n                                                    \"code\": \"SMS\",\r\n                                                    \"display\": \"SMS\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientNotificationType\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/PatientNotificationType\",\r\n                                                    \"code\": \"messenger-tel\",\r\n                                                    \"display\": \"Telegram\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientNotificationType\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/PatientNotificationType\",\r\n                                                    \"code\": \"e-mail\",\r\n                                                    \"display\": \"e-mail\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientConsentForNotification\",\r\n                                        \"valueBoolean\": true\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientAccountPoint\",\r\n                                        \"valueBoolean\": true\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientTelecomPurpose\"\r\n                            }\r\n                        ],\r\n                        \"system\": \"phone\",\r\n                        \"value\": \"295748410\"\r\n                    },\r\n                    {\r\n                        \"system\": \"email\",\r\n                        \"value\": \"test_mail@gmail.by\"\r\n                    }\r\n                ],\r\n                \"gender\": \"male\",\r\n                \"birthDate\": \"1990-12-31\",\r\n                \"deceasedBoolean\": false,\r\n                \"address\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"code\": \"5170309411\",\r\n                                            \"display\": \"Улица Золотая Горка\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 29\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"home\",\r\n                        \"text\": \"г.Минск, Улица Золотая Горка, д.5, кв.29\",\r\n                        \"postalCode\": \"220022\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"code\": \"51703019678\",\r\n                                            \"display\": \"Проспект Рокоссовского\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 2\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"temp\",\r\n                        \"text\": \"г.Минск, Проспект Рокоссовского, д.20, кв.2\",\r\n                        \"postalCode\": \"220011\"\r\n                    }\r\n                ],\r\n                \"maritalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/MaritalStatus\",\r\n                            \"code\": \"married\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"contact\": [\r\n                    {\r\n                        \"relationship\": [\r\n                            {\r\n                                \"coding\": [\r\n                                    {\r\n                                        \"system\": \"https://fhir.by/ValueSet/RelatedPersonType\",\r\n                                        \"code\": \"wife\"\r\n                                    }\r\n                                ]\r\n                            }\r\n                        ],\r\n                        \"name\": {\r\n                            \"family\": \"Иванова\",\r\n                            \"given\": [\r\n                                \"Лариса\",\r\n                                \"Ивановна\"\r\n                            ]\r\n                        },\r\n                        \"telecom\": [\r\n                            {\r\n                                \"system\": \"phone\",\r\n                                \"value\": \"802990990908\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"generalPractitioner\": [\r\n                    {\r\n                        \"reference\": \"Organization/97e05a7d-b923-4b34-bf76-e4b19e248f83\",\r\n                        \"identifier\": {\r\n                            \"value\": \"123156789012\",\r\n                            \"period\": {\r\n                                \"start\": \"2002-12-11\"\r\n                            }\r\n                        }\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"DiagnosticReport/ExampleDiagnosticReportLabAlcoTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"DiagnosticReport\",\r\n                \"id\": \"ExampleDiagnosticReportLabAlcoTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/DiagnosticReportLab\"\r\n                    ]\r\n                },\r\n                \"identifier\": [\r\n                    {\r\n                        \"value\": \"12377\",\r\n                        \"assigner\": {\r\n                            \"extension\": [\r\n                                {\r\n                                    \"url\": \"https://fhir.by/StructureDefinition/LocationReference\",\r\n                                    \"valueReference\": {\r\n                                        \"reference\": \"Location/{{LocationId}}\"\r\n                                    }\r\n                                }\r\n                            ],\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"status\": \"final\",\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/TypesOfLabTests\",\r\n                            \"code\": \"11.2.2.2\",\r\n                            \"display\": \"Этанол, обнаружение в крови, моче\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/PatientTest\"\r\n                },\r\n                \"issued\": \"2025-12-10T14:00:00Z\",\r\n                \"resultsInterpreter\": [\r\n                    {\r\n                        \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                    }\r\n                ],\r\n                \"result\": [\r\n                    {\r\n                        \"reference\": \"Observation/ExampleKdlObservationAlcoTest\"\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"DiagnosticReport/ExampleDiagnosticReportLabOpiumTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"DiagnosticReport\",\r\n                \"id\": \"ExampleDiagnosticReportLabOpiumTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/DiagnosticReportLab\"\r\n                    ]\r\n                },\r\n                \"identifier\": [\r\n                    {\r\n                        \"value\": \"12336991\",\r\n                        \"assigner\": {\r\n                            \"extension\": [\r\n                                {\r\n                                    \"url\": \"https://fhir.by/StructureDefinition/LocationReference\",\r\n                                    \"valueReference\": {\r\n                                        \"reference\": \"Location/{{LocationId}}\"\r\n                                    }\r\n                                }\r\n                            ],\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"status\": \"final\",\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/TypesOfLabTests\",\r\n                            \"code\": \"11.12.1\",\r\n                            \"display\": \"Определение полусинтетических опиатов\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/PatientTest\"\r\n                },\r\n                \"issued\": \"2025-12-10T14:00:00Z\",\r\n                \"resultsInterpreter\": [\r\n                    {\r\n                        \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                    }\r\n                ],\r\n                \"result\": [\r\n                    {\r\n                        \"reference\": \"Observation/ExampleKdlObservationOpiumTest\"\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Observation/ExampleKdlObservationAlcoTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Observation\",\r\n                \"id\": \"ExampleKdlObservationAlcoTest\",\r\n                \"meta\": {\r\n                    \"lastUpdated\": \"2025-12-10T14:00:00Z\",\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/ObservationLabTest\"\r\n                    ]\r\n                },\r\n                \"identifier\": [\r\n                    {\r\n                        \"value\": \"1236355\",\r\n                        \"assigner\": {\r\n                            \"extension\": [\r\n                                {\r\n                                    \"url\": \"https://fhir.by/StructureDefinition/LocationReference\",\r\n                                    \"valueReference\": {\r\n                                        \"reference\": \"Location/{{LocationId}}\"\r\n                                    }\r\n                                }\r\n                            ],\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"status\": \"final\",\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/TypesOfLabTests\",\r\n                            \"code\": \"11.2.2.2\",\r\n                            \"display\": \"Этанол, обнаружение в крови, моче\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/PatientTest\"\r\n                },\r\n                \"effectiveDateTime\": \"2025-12-10T14:00:00Z\",\r\n                \"performer\": [\r\n                    {\r\n                        \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                    }\r\n                ],\r\n                \"valueQuantity\": {\r\n                    \"value\": 3.2,\r\n                    \"unit\": \"Промилле\",\r\n                    \"system\": \"https://fhir.by/ValueSet/OlisUnitsOfMeasurement\",\r\n                    \"code\": \"54\"\r\n                }\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Observation/ExampleKdlObservationOpiumTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Observation\",\r\n                \"id\": \"ExampleKdlObservationOpiumTest\",\r\n                \"meta\": {\r\n                    \"lastUpdated\": \"2025-12-10T14:00:00Z\",\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/ObservationLabTest\"\r\n                    ]\r\n                },\r\n                \"identifier\": [\r\n                    {\r\n                        \"value\": \"1236356577\",\r\n                        \"assigner\": {\r\n                            \"extension\": [\r\n                                {\r\n                                    \"url\": \"https://fhir.by/StructureDefinition/LocationReference\",\r\n                                    \"valueReference\": {\r\n                                        \"reference\": \"Location/{{LocationId}}\"\r\n                                    }\r\n                                }\r\n                            ],\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"status\": \"final\",\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/TypesOfLabTests\",\r\n                            \"code\": \"11.12.1\",\r\n                            \"display\": \"Определение полусинтетических опиатов\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/PatientTest\"\r\n                },\r\n                \"effectiveDateTime\": \"2025-12-10T14:00:00Z\",\r\n                \"performer\": [\r\n                    {\r\n                        \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                    }\r\n                ],\r\n                \"valueBoolean\": true\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"ClinicalImpression/ExampleSubstanceIntoxicationTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"ClinicalImpression\",\r\n                \"id\": \"ExampleSubstanceIntoxicationTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/MedAssessmentSubstanceIntoxication\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/SignsOfSubstanceIntoxication\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/SignsOfSubstanceIntoxication\",\r\n                                    \"code\": \"03\",\r\n                                    \"display\": \"Сообщение должностного лица государственного органа или иной организации, общественного объединения о потреблении физическим лицом алкогольных, слабоалкогольных напитков, пива, наркотических средств, психотропных веществ, их аналогов, токсических или других одурманивающих веществ\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/SignsOfSubstanceIntoxication\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/SignsOfSubstanceIntoxication\",\r\n                                    \"code\": \"05\",\r\n                                    \"display\": \"Запах алкоголя изо рта\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/SignsOfSubstanceIntoxication\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/SignsOfSubstanceIntoxication\",\r\n                                    \"code\": \"06\",\r\n                                    \"display\": \"Затруднения при сохранении равновесия\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/SignsOfSubstanceIntoxication\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/SignsOfSubstanceIntoxication\",\r\n                                    \"code\": \"07\",\r\n                                    \"display\": \"Нарушения речия\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/SignsOfSubstanceIntoxication\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/SignsOfSubstanceIntoxication\",\r\n                                    \"code\": \"10\",\r\n                                    \"display\": \"Шатающаяся походка\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/Familiarization\",\r\n                        \"valueBoolean\": true\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"value\": \"2345543\",\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"status\": \"completed\",\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/PatientTest\"\r\n                },\r\n                \"effectivePeriod\": {\r\n                    \"start\": \"2025-12-10T14:00:00Z\",\r\n                    \"end\": \"2025-12-10T15:00:00Z\"\r\n                },\r\n                \"date\": \"2025-12-10\",\r\n                \"performer\": {\r\n                    \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                },\r\n                \"prognosisCodeableConcept\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/SubstanceIntoxication\",\r\n                                \"code\": \"alcohol_drug_intoxication\",\r\n                                \"display\": \"Состояние алкогольного опьянения и состояние, вызванное потреблением наркотических средств, психотропных веществ, их аналогов, токсических или других одурманивающих веществ\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"supportingInfo\": [\r\n                    {\r\n                        \"reference\": \"DiagnosticReport/ExampleDiagnosticReportLabAlcoTest\"\r\n                    },\r\n                    {\r\n                        \"reference\": \"DiagnosticReport/ExampleDiagnosticReportLabOpiumTest\"\r\n                    }\r\n                ]\r\n            }\r\n        }\r\n    ]\r\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/$import",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "$import"
              ]
            }
          },
          "response": []
        },
        {
          "name": "получение статуса импорта пакета медицинской информации",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  ""
                ],
                "type": "text/javascript",
                "packages": {}
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/{{bundleId}}/$status",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "{{bundleId}}",
                "$status"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Проверка наличия ресурса MedAssessmentSubstanceIntoxication",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          },
          "request": {
            "method": "GET",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/ClinicalImpression?_profile=https://fhir.by/StructureDefinition/MedAssessmentSubstanceIntoxication&patient={{patientId}}&_sort=-_lastUpdated",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Patient",
                "{{patientId}}",
                "ClinicalImpression"
              ],
              "query": [
                {
                  "key": "_profile",
                  "value": "https://fhir.by/StructureDefinition/MedAssessmentSubstanceIntoxication"
                },
                {
                  "key": "patient",
                  "value": "{{patientId}}"
                },
                {
                  "key": "_sort",
                  "value": "-_lastUpdated"
                }
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Кейс 2. Выдача заключения о наличии/отсутствии заболеваний, предоставляющих опасность для здоровья населения, вируса иммунодефицита человека",
      "item": [
        {
          "name": "импорт пакета медицинской информации",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "pm.test(\"Валидный бандл должен отработать со статусом 202\", function () {\r",
                  "    pm.response.to.have.status(202);\r",
                  "});\r",
                  "\r",
                  "var jsonData = pm.response.json();\r",
                  "let bundleId = jsonData.parameter.find(obj => obj.name === \"ResourceId\").valueString;\r",
                  "let statusReference = jsonData.parameter.find(obj => obj.name === \"OperationStatusReference\");\r",
                  "\r",
                  "console.log(statusReference.valueReference.reference);\r",
                  "\r",
                  "pm.collectionVariables.set(\"bundleId\", bundleId);\r",
                  "pm.collectionVariables.set(\"StatusUrl\", statusReference.valueReference.reference);\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            },
            {
              "listen": "prerequest",
              "script": {
                "exec": [
                  "// const iehrTools = pm.require('@grey-escape-331258/iehr-tools');\r",
                  "\r",
                  "// var requestdata = JSON.parse(pm.request.body.raw);\r",
                  "// let patient = requestdata.entry.find(obj => obj.resource.resourceType === \"Patient\").resource;\r",
                  "// let composition = requestdata.entry.filter(obj => obj.resource.resourceType === \"Composition\")[0].resource;\r",
                  "\r",
                  "// let actualDate = new Date(Date.parse(composition.date.substr(0, 7)));\r",
                  "// let actualDateStart = iehrTools.addMonth(actualDate, -1);\r",
                  "// let actualDateEnd = iehrTools.addMonth(actualDate, 1);\r",
                  "\r",
                  "// pm.collectionVariables.set(\"actualDateStart\", actualDateStart.toISOString().substring(0,7));\r",
                  "// pm.collectionVariables.set(\"actualDateEnd\", actualDateEnd.toISOString().substring(0,7));\r",
                  "// pm.collectionVariables.set(\"actualDate\", actualDate.toISOString().substring(0,10));\r",
                  "// // --- Patient ----\r",
                  "// let patientName = patient.name[0].family;\r",
                  "// let patientDate = patient.birthDate;\r",
                  "// let patientAddress = patient.address[0];\r",
                  "// let patientIdentifier = patient.identifier[0];\r",
                  "\r",
                  "// console.log(pm.request.auth)\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Fhir-By-Version",
                "value": "active",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\r\n    \"resourceType\": \"Bundle\",\r\n    \"id\": \"ExampleBundleCommunicableDiseasesTest\",\r\n    \"meta\": {\r\n        \"profile\": [\r\n            \"https://fhir.by/AbstractArea/StructureDefinition/Bundle/MedicationDocument\"\r\n        ]\r\n    },\r\n    \"identifier\": {\r\n        \"system\": \"https://fhir.by/ValueSet/urn:ietf:rfc:3986\",\r\n        \"value\": \"{{$guid}}\"\r\n    },\r\n    \"type\": \"document\",\r\n    \"timestamp\": \"2025-12-10T14:00:00Z\",\r\n    \"entry\": [\r\n        {\r\n            \"fullUrl\": \"Composition/CompositionCommunicableDiseasesTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Composition\",\r\n                \"id\": \"CompositionCommunicableDiseasesTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/CompDocument\"\r\n                    ]\r\n                },\r\n                \"status\": \"final\",\r\n                \"type\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/CompositionType\",\r\n                            \"code\": \"general\",\r\n                            \"display\": \"Общая медицинская информация\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": [\r\n                    {\r\n                        \"reference\": \"Patient/PatientTest\"\r\n                    }\r\n                ],\r\n                \"date\": \"2025-12-10T14:00:00Z\",\r\n                \"author\": [\r\n                    {\r\n                        \"reference\": \"Practitioner/{{PractitionerId}}\"\r\n                    }\r\n                ],\r\n                \"title\": \"CompDocument для наполненного Bundle для заключения, подтверждающий отсутствие (наличие) состояния, вызванного потреблением ПАВ\",\r\n                \"custodian\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                },\r\n                \"event\": [\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"ClinicalImpression/ExampleCommunicableDiseasesTest\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"DiagnosticReport/ExampleDiagnosticReportCholeraTest\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"DiagnosticReport/ExampleDiagnosticReportLabHIVTest\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"Observation/ExampleKdlObservationCholeraTest\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Patient/PatientTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Patient\",\r\n                \"id\": \"PatientTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/PatientWithIdentificationNumber\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/IncapacityExtension\",\r\n                        \"valueBoolean\": true\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DisabilityGroup\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/DisabilityGroup\",\r\n                                    \"code\": \"2_group\",\r\n                                    \"display\": \"II группа\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DisabilityReason\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/DisabilityReason\",\r\n                                    \"code\": \"general\",\r\n                                    \"display\": \"общее заболевание\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobProfession\",\r\n                                \"valueString\": \"Инспектор по контролю за содержанием и охране зеленых насаждений\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobProfessionCode\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/SpecialtyProfPerson\",\r\n                                            \"code\": \"3119-007\",\r\n                                            \"display\": \"Инспектор по контролю за содержанием и охране зеленых насаждений\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobPlace\",\r\n                                \"valueString\": \"УП «Зеленстрой»\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/TermOFWork\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2020-11-07\"\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/MainJobPlace\",\r\n                                \"valueBoolean\": true\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientJob\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataBoolean\",\r\n                                \"valueBoolean\": true\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataPeriod\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2025-01-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalData\"\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"INP\",\r\n                                    \"display\": \"Уникальный идентификационный номер\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"7551027A009PB6\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedString\",\r\n                                        \"valueString\": \"Центральным РУВД г Минска, 21.08.2021\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedDate\",\r\n                                        \"valueDate\": \"2021-08-21\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedCode\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/OCAM\",\r\n                                                    \"code\": \"710\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PassportIssued\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"Passport-RB\",\r\n                                    \"display\": \"Паспорт гражданина Республики Беларусь\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"MP2334561\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedDate\",\r\n                                        \"valueDate\": \"2024-03-01\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedString\",\r\n                                        \"valueString\": \"Центральным МРЭК г Минска, 31.01.2024\"\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PassportIssued\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"official\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"CDP\",\r\n                                    \"display\": \"Удостоверение инвалида\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"Серия 09 №1234562\",\r\n                        \"period\": {\r\n                            \"start\": \"2024-02-15\"\r\n                        },\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/af69999d-3e5c-49b9-a9e9-38e7687785f3\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedDate\",\r\n                                        \"valueDate\": \"1990-12-31\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedString\",\r\n                                        \"valueString\": \"Октябрьское РУВД г.Минска\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedCode\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/OCAM\",\r\n                                                    \"code\": \"705\",\r\n                                                    \"display\": \"Октябрьское РУВД г.Минска\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PassportIssued\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"BC\",\r\n                                    \"display\": \"Свидетельство о рождении\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"АВ7654322\"\r\n                    }\r\n                ],\r\n                \"active\": true,\r\n                \"name\": [\r\n                    {\r\n                        \"family\": \"Иванов\",\r\n                        \"given\": [\r\n                            \"Петр\",\r\n                            \"Сидорович\"\r\n                        ]\r\n                    }\r\n                ],\r\n                \"telecom\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientNotificationType\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/PatientNotificationType\",\r\n                                                    \"code\": \"SMS\",\r\n                                                    \"display\": \"SMS\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientNotificationType\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/PatientNotificationType\",\r\n                                                    \"code\": \"messenger-tel\",\r\n                                                    \"display\": \"Telegram\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientNotificationType\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/PatientNotificationType\",\r\n                                                    \"code\": \"e-mail\",\r\n                                                    \"display\": \"e-mail\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientConsentForNotification\",\r\n                                        \"valueBoolean\": true\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientAccountPoint\",\r\n                                        \"valueBoolean\": true\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientTelecomPurpose\"\r\n                            }\r\n                        ],\r\n                        \"system\": \"phone\",\r\n                        \"value\": \"295748410\"\r\n                    },\r\n                    {\r\n                        \"system\": \"email\",\r\n                        \"value\": \"test_mail@gmail.by\"\r\n                    }\r\n                ],\r\n                \"gender\": \"male\",\r\n                \"birthDate\": \"1990-12-31\",\r\n                \"deceasedBoolean\": false,\r\n                \"address\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"code\": \"5170309411\",\r\n                                            \"display\": \"Улица Золотая Горка\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 29\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"home\",\r\n                        \"text\": \"г.Минск, Улица Золотая Горка, д.5, кв.29\",\r\n                        \"postalCode\": \"220022\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"code\": \"51703019678\",\r\n                                            \"display\": \"Проспект Рокоссовского\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 2\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"temp\",\r\n                        \"text\": \"г.Минск, Проспект Рокоссовского, д.20, кв.2\",\r\n                        \"postalCode\": \"220011\"\r\n                    }\r\n                ],\r\n                \"maritalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/MaritalStatus\",\r\n                            \"code\": \"married\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"contact\": [\r\n                    {\r\n                        \"relationship\": [\r\n                            {\r\n                                \"coding\": [\r\n                                    {\r\n                                        \"system\": \"https://fhir.by/ValueSet/RelatedPersonType\",\r\n                                        \"code\": \"wife\"\r\n                                    }\r\n                                ]\r\n                            }\r\n                        ],\r\n                        \"name\": {\r\n                            \"family\": \"Иванова\",\r\n                            \"given\": [\r\n                                \"Лариса\",\r\n                                \"Ивановна\"\r\n                            ]\r\n                        },\r\n                        \"telecom\": [\r\n                            {\r\n                                \"system\": \"phone\",\r\n                                \"value\": \"802990990908\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"generalPractitioner\": [\r\n                    {\r\n                        \"reference\": \"Organization/{{OrganizationId}}\",\r\n                        \"identifier\": {\r\n                            \"value\": \"123156789012\",\r\n                            \"period\": {\r\n                                \"start\": \"2002-12-11\"\r\n                            }\r\n                        }\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"DiagnosticReport/ExampleDiagnosticReportCholeraTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"DiagnosticReport\",\r\n                \"id\": \"ExampleDiagnosticReportCholeraTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/DiagnosticReportLab\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/ResearchMethods\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/OlisMethodsSplit\",\r\n                                    \"code\": \"43\",\r\n                                    \"display\": \"Метод амплификации нуклеиновых кислот\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"value\": \"30341\",\r\n                        \"assigner\": {\r\n                            \"extension\": [\r\n                                {\r\n                                    \"url\": \"https://fhir.by/StructureDefinition/LocationReference\",\r\n                                    \"valueReference\": {\r\n                                        \"reference\": \"Location/{{LocationId}}\"\r\n                                    }\r\n                                }\r\n                            ],\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"status\": \"final\",\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/TypesOfLabTests\",\r\n                            \"code\": \"8.2.593\",\r\n                            \"display\": \"Vibrio cholerae ген токсина (ctx), обнаружение в любой пробе\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/PatientTest\"\r\n                },\r\n                \"issued\": \"2025-12-10T14:00:00Z\",\r\n                \"resultsInterpreter\": [\r\n                    {\r\n                        \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                    }\r\n                ],\r\n                \"result\": [\r\n                    {\r\n                        \"reference\": \"Observation/ExampleKdlObservationCholeraTest\"\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"DiagnosticReport/ExampleDiagnosticReportLabHIVTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"DiagnosticReport\",\r\n                \"id\": \"ExampleDiagnosticReportLabHIVTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/DiagnosticReportLab\"\r\n                    ]\r\n                },\r\n                \"identifier\": [\r\n                    {\r\n                        \"value\": \"12777941\",\r\n                        \"assigner\": {\r\n                            \"extension\": [\r\n                                {\r\n                                    \"url\": \"https://fhir.by/StructureDefinition/LocationReference\",\r\n                                    \"valueReference\": {\r\n                                        \"reference\": \"Location/{{LocationId}}\"\r\n                                    }\r\n                                }\r\n                            ],\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"status\": \"final\",\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/TypesOfLabTests\",\r\n                            \"code\": \"5.9.404\",\r\n                            \"display\": \"Антитела к ВИЧ 1 и 2, обнаружение\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/PatientTest\"\r\n                },\r\n                \"issued\": \"2025-12-10T14:00:00Z\",\r\n                \"resultsInterpreter\": [\r\n                    {\r\n                        \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                    }\r\n                ],\r\n                \"conclusion\": \"Положительный\"\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Observation/ExampleKdlObservationCholeraTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Observation\",\r\n                \"id\": \"ExampleKdlObservationCholeraTest\",\r\n                \"meta\": {\r\n                    \"lastUpdated\": \"2025-12-10T14:00:00Z\",\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/ObservationLabMicroorganism\"\r\n                    ]\r\n                },\r\n                \"identifier\": [\r\n                    {\r\n                        \"value\": \"1222\",\r\n                        \"assigner\": {\r\n                            \"extension\": [\r\n                                {\r\n                                    \"url\": \"https://fhir.by/StructureDefinition/LocationReference\",\r\n                                    \"valueReference\": {\r\n                                        \"reference\": \"Location/{{LocationId}}\"\r\n                                    }\r\n                                }\r\n                            ],\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"status\": \"final\",\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/TypesOfLabTests\",\r\n                            \"code\": \"8.2.593\",\r\n                            \"display\": \"Vibrio cholerae ген токсина (ctx), обнаружение в любой пробе\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/PatientTest\"\r\n                },\r\n                \"effectiveDateTime\": \"2025-12-10T14:00:00Z\",\r\n                \"performer\": [\r\n                    {\r\n                        \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                    }\r\n                ],\r\n                \"valueCodeableConcept\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/Microorganisms\",\r\n                            \"code\": \"Selenomonas flueggei\",\r\n                            \"display\": \"Selenomonas flueggei\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"component\": [\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/MicroorganismSpecs\",\r\n                                    \"code\": \"MicroorganismQuantity\",\r\n                                    \"display\": \"Колличество\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueString\": \"умеренный рост\"\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/MicroorganismSpecs\",\r\n                                    \"code\": \"BetaLactamase\",\r\n                                    \"display\": \"Beta-лактамаза\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueBoolean\": true\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/MicroorganismSpecs\",\r\n                                    \"code\": \"GramPositive\",\r\n                                    \"display\": \"Грамм-положительность\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueBoolean\": false\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/MicroorganismSpecs\",\r\n                                    \"code\": \"Antibiotic\",\r\n                                    \"display\": \"Антибиотик\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/Antimicrobials\",\r\n                                    \"code\": \"azithromycin\",\r\n                                    \"display\": \"азитромицин\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"interpretation\": [\r\n                            {\r\n                                \"coding\": [\r\n                                    {\r\n                                        \"system\": \"https://fhir.by/ValueSet/AntimicrobialSensitivityIndicator\",\r\n                                        \"code\": \"S\",\r\n                                        \"display\": \"S\"\r\n                                    }\r\n                                ]\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"code\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/MicroorganismSpecs\",\r\n                                    \"code\": \"Antibiotic\",\r\n                                    \"display\": \"Антибиотик\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/Antimicrobials\",\r\n                                    \"code\": \"doxycyclin\",\r\n                                    \"display\": \"доксициклин\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"interpretation\": [\r\n                            {\r\n                                \"coding\": [\r\n                                    {\r\n                                        \"system\": \"https://fhir.by/ValueSet/AntimicrobialSensitivityIndicator\",\r\n                                        \"code\": \"R\",\r\n                                        \"display\": \"R\"\r\n                                    }\r\n                                ]\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"ClinicalImpression/ExampleCommunicableDiseasesTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"ClinicalImpression\",\r\n                \"id\": \"ExampleCommunicableDiseasesTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/MedAssessmentCommunicableDiseases\"\r\n                    ]\r\n                },\r\n                \"identifier\": [\r\n                    {\r\n                        \"value\": \"234245\",\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"status\": \"completed\",\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/PatientTest\"\r\n                },\r\n                \"effectivePeriod\": {\r\n                    \"start\": \"2025-12-10T14:00:00Z\",\r\n                    \"end\": \"2025-12-10T15:00:00Z\"\r\n                },\r\n                \"date\": \"2025-12-10\",\r\n                \"performer\": {\r\n                    \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                },\r\n                \"prognosisCodeableConcept\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/CommunicableDiseases\",\r\n                                \"code\": \"communicable_diseases\",\r\n                                \"display\": \"Имеются заболевания, включенные в перечень заболеваний, представляющих опасность для здоровья населения\"\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/CommunicableDiseases\",\r\n                                \"code\": \"hiv\",\r\n                                \"display\": \"Инфицирован(а) ВИЧ\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"supportingInfo\": [\r\n                    {\r\n                        \"reference\": \"DiagnosticReport/ExampleDiagnosticReportCholeraTest\"\r\n                    },\r\n                    {\r\n                        \"reference\": \"DiagnosticReport/ExampleDiagnosticReportLabHIVTest\"\r\n                    }\r\n                ]\r\n            }\r\n        }\r\n    ]\r\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/$import",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "$import"
              ]
            }
          },
          "response": []
        },
        {
          "name": "получение статуса импорта пакета медицинской информации",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  ""
                ],
                "type": "text/javascript",
                "packages": {}
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/{{bundleId}}/$status",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "{{bundleId}}",
                "$status"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Проверка наличия ресурса MedAssessmentCommunicableDiseases",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          },
          "request": {
            "method": "GET",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/ClinicalImpression?_profile=https://fhir.by/StructureDefinition/MedAssessmentCommunicableDiseases&patient={{patientId}}&_sort=-_lastUpdated",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Patient",
                "{{patientId}}",
                "ClinicalImpression"
              ],
              "query": [
                {
                  "key": "_profile",
                  "value": "https://fhir.by/StructureDefinition/MedAssessmentCommunicableDiseases"
                },
                {
                  "key": "patient",
                  "value": "{{patientId}}"
                },
                {
                  "key": "_sort",
                  "value": "-_lastUpdated"
                }
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Кейс 3. Выдача заключения о наличии/отсутствии противопоказания, препятствующие управлению механическими транспортными средствами",
      "item": [
        {
          "name": "импорт пакета медицинской информации",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "pm.test(\"Валидный бандл должен отработать со статусом 202\", function () {\r",
                  "    pm.response.to.have.status(202);\r",
                  "});\r",
                  "\r",
                  "var jsonData = pm.response.json();\r",
                  "let bundleId = jsonData.parameter.find(obj => obj.name === \"ResourceId\").valueString;\r",
                  "let statusReference = jsonData.parameter.find(obj => obj.name === \"OperationStatusReference\");\r",
                  "\r",
                  "console.log(statusReference.valueReference.reference);\r",
                  "\r",
                  "pm.collectionVariables.set(\"bundleId\", bundleId);\r",
                  "pm.collectionVariables.set(\"StatusUrl\", statusReference.valueReference.reference);\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            },
            {
              "listen": "prerequest",
              "script": {
                "exec": [
                  "// const iehrTools = pm.require('@grey-escape-331258/iehr-tools');\r",
                  "\r",
                  "// var requestdata = JSON.parse(pm.request.body.raw);\r",
                  "// let patient = requestdata.entry.find(obj => obj.resource.resourceType === \"Patient\").resource;\r",
                  "// let composition = requestdata.entry.filter(obj => obj.resource.resourceType === \"Composition\")[0].resource;\r",
                  "\r",
                  "// let actualDate = new Date(Date.parse(composition.date.substr(0, 7)));\r",
                  "// let actualDateStart = iehrTools.addMonth(actualDate, -1);\r",
                  "// let actualDateEnd = iehrTools.addMonth(actualDate, 1);\r",
                  "\r",
                  "// pm.collectionVariables.set(\"actualDateStart\", actualDateStart.toISOString().substring(0,7));\r",
                  "// pm.collectionVariables.set(\"actualDateEnd\", actualDateEnd.toISOString().substring(0,7));\r",
                  "// pm.collectionVariables.set(\"actualDate\", actualDate.toISOString().substring(0,10));\r",
                  "// // --- Patient ----\r",
                  "// let patientName = patient.name[0].family;\r",
                  "// let patientDate = patient.birthDate;\r",
                  "// let patientAddress = patient.address[0];\r",
                  "// let patientIdentifier = patient.identifier[0];\r",
                  "\r",
                  "// console.log(pm.request.auth)\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Fhir-By-Version",
                "value": "active",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\r\n    \"resourceType\": \"Bundle\",\r\n    \"id\": \"ExampleBundleDriverTest\",\r\n    \"meta\": {\r\n        \"profile\": [\r\n            \"https://fhir.by/AbstractArea/StructureDefinition/Bundle/MedicationDocument\"\r\n        ]\r\n    },\r\n    \"identifier\": {\r\n        \"system\": \"https://fhir.by/ValueSet/urn:ietf:rfc:3986\",\r\n        \"value\": \"{{$guid}}\"\r\n    },\r\n    \"type\": \"document\",\r\n    \"timestamp\": \"2025-12-10T14:00:00Z\",\r\n    \"entry\": [\r\n        {\r\n            \"fullUrl\": \"Composition/CompositionDriverTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Composition\",\r\n                \"id\": \"CompositionDriverTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/CompDocument\"\r\n                    ]\r\n                },\r\n                \"status\": \"final\",\r\n                \"type\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/CompositionType\",\r\n                            \"code\": \"general\",\r\n                            \"display\": \"Общая медицинская информация\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": [\r\n                    {\r\n                        \"reference\": \"Patient/PatientTest\"\r\n                    }\r\n                ],\r\n                \"date\": \"2025-12-10T14:00:00Z\",\r\n                \"author\": [\r\n                    {\r\n                        \"reference\": \"Practitioner/{{PractitionerId}}\"\r\n                    }\r\n                ],\r\n                \"title\": \"CompDocument для наполненного Bundle для заключения, подтверждающее факт наличия или отсутствия у физического лица заболевания или противопоказания, препятствующие управлению механическими транспортными средствами, самоходными машинами, моторными маломерными судами\",\r\n                \"custodian\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                },\r\n                \"event\": [\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"ClinicalImpression/ExampleDriverTest\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Patient/PatientTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Patient\",\r\n                \"id\": \"PatientTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/PatientWithIdentificationNumber\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/IncapacityExtension\",\r\n                        \"valueBoolean\": true\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DisabilityGroup\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/DisabilityGroup\",\r\n                                    \"code\": \"2_group\",\r\n                                    \"display\": \"II группа\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DisabilityReason\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/DisabilityReason\",\r\n                                    \"code\": \"general\",\r\n                                    \"display\": \"общее заболевание\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobProfession\",\r\n                                \"valueString\": \"Инспектор по контролю за содержанием и охране зеленых насаждений\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobProfessionCode\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/SpecialtyProfPerson\",\r\n                                            \"code\": \"3119-007\",\r\n                                            \"display\": \"Инспектор по контролю за содержанием и охране зеленых насаждений\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobPlace\",\r\n                                \"valueString\": \"УП «Зеленстрой»\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/TermOFWork\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2020-11-07\"\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/MainJobPlace\",\r\n                                \"valueBoolean\": true\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientJob\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataBoolean\",\r\n                                \"valueBoolean\": true\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataPeriod\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2025-01-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalData\"\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"INP\",\r\n                                    \"display\": \"Уникальный идентификационный номер\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"7551027A009PB6\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedString\",\r\n                                        \"valueString\": \"Центральным РУВД г Минска, 21.08.2021\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedDate\",\r\n                                        \"valueDate\": \"2021-08-21\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedCode\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/OCAM\",\r\n                                                    \"code\": \"710\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PassportIssued\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"Passport-RB\",\r\n                                    \"display\": \"Паспорт гражданина Республики Беларусь\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"MP2334561\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedDate\",\r\n                                        \"valueDate\": \"2024-03-01\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedString\",\r\n                                        \"valueString\": \"Центральным МРЭК г Минска, 31.01.2024\"\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PassportIssued\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"official\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"CDP\",\r\n                                    \"display\": \"Удостоверение инвалида\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"Серия 09 №1234562\",\r\n                        \"period\": {\r\n                            \"start\": \"2024-02-15\"\r\n                        },\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedDate\",\r\n                                        \"valueDate\": \"1990-12-31\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedString\",\r\n                                        \"valueString\": \"Октябрьское РУВД г.Минска\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedCode\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/OCAM\",\r\n                                                    \"code\": \"705\",\r\n                                                    \"display\": \"Октябрьское РУВД г.Минска\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PassportIssued\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"BC\",\r\n                                    \"display\": \"Свидетельство о рождении\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"АВ7654322\"\r\n                    }\r\n                ],\r\n                \"active\": true,\r\n                \"name\": [\r\n                    {\r\n                        \"family\": \"Иванов\",\r\n                        \"given\": [\r\n                            \"Петр\",\r\n                            \"Сидорович\"\r\n                        ]\r\n                    }\r\n                ],\r\n                \"telecom\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientNotificationType\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/PatientNotificationType\",\r\n                                                    \"code\": \"SMS\",\r\n                                                    \"display\": \"SMS\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientNotificationType\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/PatientNotificationType\",\r\n                                                    \"code\": \"messenger-tel\",\r\n                                                    \"display\": \"Telegram\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientNotificationType\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/PatientNotificationType\",\r\n                                                    \"code\": \"e-mail\",\r\n                                                    \"display\": \"e-mail\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientConsentForNotification\",\r\n                                        \"valueBoolean\": true\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientAccountPoint\",\r\n                                        \"valueBoolean\": true\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientTelecomPurpose\"\r\n                            }\r\n                        ],\r\n                        \"system\": \"phone\",\r\n                        \"value\": \"295748410\"\r\n                    },\r\n                    {\r\n                        \"system\": \"email\",\r\n                        \"value\": \"test_mail@gmail.by\"\r\n                    }\r\n                ],\r\n                \"gender\": \"male\",\r\n                \"birthDate\": \"1990-12-31\",\r\n                \"deceasedBoolean\": false,\r\n                \"address\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"code\": \"5170309411\",\r\n                                            \"display\": \"Улица Золотая Горка\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 29\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"home\",\r\n                        \"text\": \"г.Минск, Улица Золотая Горка, д.5, кв.29\",\r\n                        \"postalCode\": \"220022\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"code\": \"51703019678\",\r\n                                            \"display\": \"Проспект Рокоссовского\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 2\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"temp\",\r\n                        \"text\": \"г.Минск, Проспект Рокоссовского, д.20, кв.2\",\r\n                        \"postalCode\": \"220011\"\r\n                    }\r\n                ],\r\n                \"maritalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/MaritalStatus\",\r\n                            \"code\": \"married\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"contact\": [\r\n                    {\r\n                        \"relationship\": [\r\n                            {\r\n                                \"coding\": [\r\n                                    {\r\n                                        \"system\": \"https://fhir.by/ValueSet/RelatedPersonType\",\r\n                                        \"code\": \"wife\"\r\n                                    }\r\n                                ]\r\n                            }\r\n                        ],\r\n                        \"name\": {\r\n                            \"family\": \"Иванова\",\r\n                            \"given\": [\r\n                                \"Лариса\",\r\n                                \"Ивановна\"\r\n                            ]\r\n                        },\r\n                        \"telecom\": [\r\n                            {\r\n                                \"system\": \"phone\",\r\n                                \"value\": \"802990990908\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"generalPractitioner\": [\r\n                    {\r\n                        \"reference\": \"Organization/{{OrganizationId}}\",\r\n                        \"identifier\": {\r\n                            \"value\": \"123156789012\",\r\n                            \"period\": {\r\n                                \"start\": \"2002-12-11\"\r\n                            }\r\n                        }\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"ClinicalImpression/ExampleDriverTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"ClinicalImpression\",\r\n                \"id\": \"ExampleDriverTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/MedAssessmentDriver\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/SpecialMarks\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/SpecialMarksDriver\",\r\n                                    \"code\": \"no_taxi\",\r\n                                    \"display\": \"негоден к управлению механическим транспортным средством оперативного назначения и (или) автомобилем-такси\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"value\": \"234122245\",\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"status\": \"completed\",\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/PatientTest\"\r\n                },\r\n                \"date\": \"2025-12-10\",\r\n                \"performer\": {\r\n                    \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                },\r\n                \"prognosisCodeableConcept\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/FitToDrive\",\r\n                                \"valueBoolean\": true\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/FitToDrivePeriod\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2024-11-28\",\r\n                                    \"end\": \"2034-11-27\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/ConclusionForDrivers\",\r\n                                \"code\": \"moped_AM\",\r\n                                \"display\": \"управление мопедами (категория `AM`)\"\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/FitToDrive\",\r\n                                \"valueBoolean\": true\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/FitToDrivePeriod\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2024-11-28\",\r\n                                    \"end\": \"2034-11-27\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/ConclusionForDrivers\",\r\n                                \"code\": \"motorcycle_A\",\r\n                                \"display\": \"управление мотоциклами (категория `A`)\"\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/FitToDrive\",\r\n                                \"valueBoolean\": true\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/FitToDrivePeriod\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2024-11-28\",\r\n                                    \"end\": \"2034-11-27\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/ConclusionForDrivers\",\r\n                                \"code\": \"motorcycle_A1\",\r\n                                \"display\": \"управление мотоциклами (подкатегория `А1`)\"\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/FitToDrive\",\r\n                                \"valueBoolean\": true\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/FitToDrivePeriod\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2024-11-28\",\r\n                                    \"end\": \"2034-11-27\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/ConclusionForDrivers\",\r\n                                \"code\": \"automobile_B\",\r\n                                \"display\": \"управление автомобилями (категория `B`)\"\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/FitToDrive\",\r\n                                \"valueBoolean\": false\r\n                            }\r\n                        ],\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/ConclusionForDrivers\",\r\n                                \"code\": \"automobile_BE\",\r\n                                \"display\": \"управление автомобилями категории `B`, сцепленными с прицепом (категория `BE`)\"\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/FitToDrive\",\r\n                                \"valueBoolean\": true\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/FitToDrivePeriod\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2024-11-28\",\r\n                                    \"end\": \"2034-11-27\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/ConclusionForDrivers\",\r\n                                \"code\": \"automobile_C\",\r\n                                \"display\": \"управление автомобилями (категория `C`)\"\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/FitToDrive\",\r\n                                \"valueBoolean\": false\r\n                            }\r\n                        ],\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/ConclusionForDrivers\",\r\n                                \"code\": \"automobile_CE\",\r\n                                \"display\": \"управление автомобилями категории `C`, сцепленными с прицепом (категория `CE`)\"\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/FitToDrive\",\r\n                                \"valueBoolean\": false\r\n                            }\r\n                        ],\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/ConclusionForDrivers\",\r\n                                \"code\": \"automobile_D\",\r\n                                \"display\": \"управление автомобилями (категория `D`)\"\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/FitToDrive\",\r\n                                \"valueBoolean\": false\r\n                            }\r\n                        ],\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/ConclusionForDrivers\",\r\n                                \"code\": \"automobile_DE\",\r\n                                \"display\": \"управление автомобилями категории `D`, сцепленными с прицепом (категория `DE`)\"\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/FitToDrive\",\r\n                                \"valueBoolean\": false\r\n                            }\r\n                        ],\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/ConclusionForDrivers\",\r\n                                \"code\": \"tram_F\",\r\n                                \"display\": \"управление трамваями (категория `F`)\"\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/FitToDrive\",\r\n                                \"valueBoolean\": false\r\n                            }\r\n                        ],\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/ConclusionForDrivers\",\r\n                                \"code\": \"trolleybus_I\",\r\n                                \"display\": \"управление троллейбусами (категория `I`)\"\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/FitToDrive\",\r\n                                \"valueBoolean\": true\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/FitToDrivePeriod\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2024-11-28\",\r\n                                    \"end\": \"2034-11-27\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/ConclusionForDrivers\",\r\n                                \"code\": \"quad_bike_A\",\r\n                                \"display\": \"управление снегоболотоходами колесными малогабаритными (квадроциклами - ATV) типа I категорий G, S и типа II; снегоходами; мотовездеходами UTV с автомобильной посадкой (категория `A`)\"\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/FitToDrive\",\r\n                                \"valueBoolean\": false\r\n                            }\r\n                        ],\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/ConclusionForDrivers\",\r\n                                \"code\": \"tractor_B\",\r\n                                \"display\": \"управление колесными тракторами и самоходными машинами (категория `B`)\"\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/FitToDrive\",\r\n                                \"valueBoolean\": false\r\n                            }\r\n                        ],\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/ConclusionForDrivers\",\r\n                                \"code\": \"tractor_C\",\r\n                                \"display\": \"управление колесными тракторами и самоходными машинами (категория `C`)\"\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/FitToDrive\",\r\n                                \"valueBoolean\": false\r\n                            }\r\n                        ],\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/ConclusionForDrivers\",\r\n                                \"code\": \"tractor_D\",\r\n                                \"display\": \"управление колесными тракторами (категория `D`)\"\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/FitToDrive\",\r\n                                \"valueBoolean\": false\r\n                            }\r\n                        ],\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/ConclusionForDrivers\",\r\n                                \"code\": \"self_propelled_E\",\r\n                                \"display\": \"управление самоходными машинами (категория `E`)\"\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/FitToDrive\",\r\n                                \"valueBoolean\": false\r\n                            }\r\n                        ],\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/ConclusionForDrivers\",\r\n                                \"code\": \"self_propelled_F\",\r\n                                \"display\": \"управление самоходными машинами (категория `F`)\"\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/FitToDrive\",\r\n                                \"valueBoolean\": false\r\n                            }\r\n                        ],\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/ConclusionForDrivers\",\r\n                                \"code\": \"motor_small_boat\",\r\n                                \"display\": \"управление моторными маломерными судами\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        }\r\n    ]\r\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/$import",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "$import"
              ]
            }
          },
          "response": []
        },
        {
          "name": "получение статуса импорта пакета медицинской информации",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  ""
                ],
                "type": "text/javascript",
                "packages": {}
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/{{bundleId}}/$status",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "{{bundleId}}",
                "$status"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Проверка наличия ресурса MedAssessmentDriver",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          },
          "request": {
            "method": "GET",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/ClinicalImpression?_profile=https://fhir.by/StructureDefinition/MedAssessmentDriver&patient={{patientId}}&_sort=-_lastUpdated",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Patient",
                "{{patientId}}",
                "ClinicalImpression"
              ],
              "query": [
                {
                  "key": "_profile",
                  "value": "https://fhir.by/StructureDefinition/MedAssessmentDriver"
                },
                {
                  "key": "patient",
                  "value": "{{patientId}}"
                },
                {
                  "key": "_sort",
                  "value": "-_lastUpdated"
                }
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Кейс 4. \tВыдача заключения о наличии/отсутствии заболеваний и физических недостатков при наличии которых противопоказано владение оружием",
      "item": [
        {
          "name": "импорт пакета медицинской информации",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "pm.test(\"Валидный бандл должен отработать со статусом 202\", function () {\r",
                  "    pm.response.to.have.status(202);\r",
                  "});\r",
                  "\r",
                  "var jsonData = pm.response.json();\r",
                  "let bundleId = jsonData.parameter.find(obj => obj.name === \"ResourceId\").valueString;\r",
                  "let statusReference = jsonData.parameter.find(obj => obj.name === \"OperationStatusReference\");\r",
                  "\r",
                  "console.log(statusReference.valueReference.reference);\r",
                  "\r",
                  "pm.collectionVariables.set(\"bundleId\", bundleId);\r",
                  "pm.collectionVariables.set(\"StatusUrl\", statusReference.valueReference.reference);\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            },
            {
              "listen": "prerequest",
              "script": {
                "exec": [
                  "// const iehrTools = pm.require('@grey-escape-331258/iehr-tools');\r",
                  "\r",
                  "// var requestdata = JSON.parse(pm.request.body.raw);\r",
                  "// let patient = requestdata.entry.find(obj => obj.resource.resourceType === \"Patient\").resource;\r",
                  "// let composition = requestdata.entry.filter(obj => obj.resource.resourceType === \"Composition\")[0].resource;\r",
                  "\r",
                  "// let actualDate = new Date(Date.parse(composition.date.substr(0, 7)));\r",
                  "// let actualDateStart = iehrTools.addMonth(actualDate, -1);\r",
                  "// let actualDateEnd = iehrTools.addMonth(actualDate, 1);\r",
                  "\r",
                  "// pm.collectionVariables.set(\"actualDateStart\", actualDateStart.toISOString().substring(0,7));\r",
                  "// pm.collectionVariables.set(\"actualDateEnd\", actualDateEnd.toISOString().substring(0,7));\r",
                  "// pm.collectionVariables.set(\"actualDate\", actualDate.toISOString().substring(0,10));\r",
                  "// // --- Patient ----\r",
                  "// let patientName = patient.name[0].family;\r",
                  "// let patientDate = patient.birthDate;\r",
                  "// let patientAddress = patient.address[0];\r",
                  "// let patientIdentifier = patient.identifier[0];\r",
                  "\r",
                  "// console.log(pm.request.auth)\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Fhir-By-Version",
                "value": "active",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\r\n    \"resourceType\": \"Bundle\",\r\n    \"id\": \"ExampleBundleWeaponOwnershipTest\",\r\n    \"meta\": {\r\n        \"profile\": [\r\n            \"https://fhir.by/AbstractArea/StructureDefinition/Bundle/MedicationDocument\"\r\n        ]\r\n    },\r\n    \"identifier\": {\r\n        \"system\": \"https://fhir.by/ValueSet/urn:ietf:rfc:3986\",\r\n        \"value\": \"{{$guid}}\"\r\n    },\r\n    \"type\": \"document\",\r\n    \"timestamp\": \"2025-12-10T14:00:00Z\",\r\n    \"entry\": [\r\n        {\r\n            \"fullUrl\": \"Composition/CompositionWeaponOwnershipTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Composition\",\r\n                \"id\": \"CompositionWeaponOwnershipTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/CompDocument\"\r\n                    ]\r\n                },\r\n                \"status\": \"final\",\r\n                \"type\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/CompositionType\",\r\n                            \"code\": \"general\",\r\n                            \"display\": \"Общая медицинская информация\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": [\r\n                    {\r\n                        \"reference\": \"Patient/PatientTest\"\r\n                    }\r\n                ],\r\n                \"date\": \"2025-12-10T14:00:00Z\",\r\n                \"author\": [\r\n                    {\r\n                        \"reference\": \"Practitioner/{{PractitionerId}}\"\r\n                    }\r\n                ],\r\n                \"title\": \"CompDocument для наполненного Bundle для заключения, подтверждающее отсутствие (наличие) заболеваний и физических недостатков, включенных в перечень заболеваний и физических недостатков граждан, при наличии которых противопоказано владение оружием\",\r\n                \"custodian\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                },\r\n                \"event\": [\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"ClinicalImpression/ExampleWeaponOwnershipTest\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Patient/PatientTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Patient\",\r\n                \"id\": \"PatientTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/PatientWithIdentificationNumber\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/IncapacityExtension\",\r\n                        \"valueBoolean\": true\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DisabilityGroup\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/DisabilityGroup\",\r\n                                    \"code\": \"2_group\",\r\n                                    \"display\": \"II группа\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DisabilityReason\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/DisabilityReason\",\r\n                                    \"code\": \"general\",\r\n                                    \"display\": \"общее заболевание\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobProfession\",\r\n                                \"valueString\": \"Инспектор по контролю за содержанием и охране зеленых насаждений\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobProfessionCode\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/SpecialtyProfPerson\",\r\n                                            \"code\": \"3119-007\",\r\n                                            \"display\": \"Инспектор по контролю за содержанием и охране зеленых насаждений\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobPlace\",\r\n                                \"valueString\": \"УП «Зеленстрой»\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/TermOFWork\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2020-11-07\"\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/MainJobPlace\",\r\n                                \"valueBoolean\": true\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientJob\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataBoolean\",\r\n                                \"valueBoolean\": true\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataPeriod\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2025-01-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalData\"\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"INP\",\r\n                                    \"display\": \"Уникальный идентификационный номер\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"7551027A009PB6\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedString\",\r\n                                        \"valueString\": \"Центральным РУВД г Минска, 21.08.2021\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedDate\",\r\n                                        \"valueDate\": \"2021-08-21\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedCode\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/OCAM\",\r\n                                                    \"code\": \"710\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PassportIssued\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"Passport-RB\",\r\n                                    \"display\": \"Паспорт гражданина Республики Беларусь\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"MP2334561\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedDate\",\r\n                                        \"valueDate\": \"2024-03-01\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedString\",\r\n                                        \"valueString\": \"Центральным МРЭК г Минска, 31.01.2024\"\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PassportIssued\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"official\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"CDP\",\r\n                                    \"display\": \"Удостоверение инвалида\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"Серия 09 №1234562\",\r\n                        \"period\": {\r\n                            \"start\": \"2024-02-15\"\r\n                        },\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedDate\",\r\n                                        \"valueDate\": \"1990-12-31\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedString\",\r\n                                        \"valueString\": \"Октябрьское РУВД г.Минска\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedCode\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/OCAM\",\r\n                                                    \"code\": \"705\",\r\n                                                    \"display\": \"Октябрьское РУВД г.Минска\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PassportIssued\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"BC\",\r\n                                    \"display\": \"Свидетельство о рождении\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"АВ7654322\"\r\n                    }\r\n                ],\r\n                \"active\": true,\r\n                \"name\": [\r\n                    {\r\n                        \"family\": \"Иванов\",\r\n                        \"given\": [\r\n                            \"Петр\",\r\n                            \"Сидорович\"\r\n                        ]\r\n                    }\r\n                ],\r\n                \"telecom\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientNotificationType\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/PatientNotificationType\",\r\n                                                    \"code\": \"SMS\",\r\n                                                    \"display\": \"SMS\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientNotificationType\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/PatientNotificationType\",\r\n                                                    \"code\": \"messenger-tel\",\r\n                                                    \"display\": \"Telegram\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientNotificationType\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/PatientNotificationType\",\r\n                                                    \"code\": \"e-mail\",\r\n                                                    \"display\": \"e-mail\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientConsentForNotification\",\r\n                                        \"valueBoolean\": true\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientAccountPoint\",\r\n                                        \"valueBoolean\": true\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientTelecomPurpose\"\r\n                            }\r\n                        ],\r\n                        \"system\": \"phone\",\r\n                        \"value\": \"295748410\"\r\n                    },\r\n                    {\r\n                        \"system\": \"email\",\r\n                        \"value\": \"test_mail@gmail.by\"\r\n                    }\r\n                ],\r\n                \"gender\": \"male\",\r\n                \"birthDate\": \"1990-12-31\",\r\n                \"deceasedBoolean\": false,\r\n                \"address\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"code\": \"5170309411\",\r\n                                            \"display\": \"Улица Золотая Горка\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 29\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"home\",\r\n                        \"text\": \"г.Минск, Улица Золотая Горка, д.5, кв.29\",\r\n                        \"postalCode\": \"220022\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"code\": \"51703019678\",\r\n                                            \"display\": \"Проспект Рокоссовского\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 2\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"temp\",\r\n                        \"text\": \"г.Минск, Проспект Рокоссовского, д.20, кв.2\",\r\n                        \"postalCode\": \"220011\"\r\n                    }\r\n                ],\r\n                \"maritalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/MaritalStatus\",\r\n                            \"code\": \"married\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"contact\": [\r\n                    {\r\n                        \"relationship\": [\r\n                            {\r\n                                \"coding\": [\r\n                                    {\r\n                                        \"system\": \"https://fhir.by/ValueSet/RelatedPersonType\",\r\n                                        \"code\": \"wife\"\r\n                                    }\r\n                                ]\r\n                            }\r\n                        ],\r\n                        \"name\": {\r\n                            \"family\": \"Иванова\",\r\n                            \"given\": [\r\n                                \"Лариса\",\r\n                                \"Ивановна\"\r\n                            ]\r\n                        },\r\n                        \"telecom\": [\r\n                            {\r\n                                \"system\": \"phone\",\r\n                                \"value\": \"802990990908\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"generalPractitioner\": [\r\n                    {\r\n                        \"reference\": \"Organization/{{OrganizationId}}\",\r\n                        \"identifier\": {\r\n                            \"value\": \"123156789012\",\r\n                            \"period\": {\r\n                                \"start\": \"2002-12-11\"\r\n                            }\r\n                        }\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"ClinicalImpression/ExampleWeaponOwnershipTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"ClinicalImpression\",\r\n                \"id\": \"ExampleWeaponOwnershipTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/MedAssessmentWeaponOwnership\"\r\n                    ]\r\n                },\r\n                \"identifier\": [\r\n                    {\r\n                        \"value\": \"2245\",\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"status\": \"completed\",\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/PatientTest\"\r\n                },\r\n                \"effectivePeriod\": {\r\n                    \"start\": \"2024-11-28T12:00:00Z\",\r\n                    \"end\": \"2025-11-27T12:00:00Z\"\r\n                },\r\n                \"date\": \"2025-12-10\",\r\n                \"performer\": {\r\n                    \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                },\r\n                \"prognosisCodeableConcept\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/WeaponOwnership\",\r\n                                \"code\": \"no_contraindications\",\r\n                                \"display\": \"Отсутствуют заболевания и физические недостатки, включенные в перечень заболеваний и физических недостатков граждан, при наличии которых противопоказано владение оружием\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        }\r\n    ]\r\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/$import",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "$import"
              ]
            }
          },
          "response": []
        },
        {
          "name": "получение статуса импорта пакета медицинской информации",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  ""
                ],
                "type": "text/javascript",
                "packages": {}
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/{{bundleId}}/$status",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "{{bundleId}}",
                "$status"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Проверка наличия ресурса MedAssessmentWeaponOwnership",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          },
          "request": {
            "method": "GET",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/ClinicalImpression?_profile=https://fhir.by/StructureDefinition/MedAssessmentWeaponOwnership&patient={{patientId}}&_sort=-_lastUpdated",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Patient",
                "{{patientId}}",
                "ClinicalImpression"
              ],
              "query": [
                {
                  "key": "_profile",
                  "value": "https://fhir.by/StructureDefinition/MedAssessmentWeaponOwnership"
                },
                {
                  "key": "patient",
                  "value": "{{patientId}}"
                },
                {
                  "key": "_sort",
                  "value": "-_lastUpdated"
                }
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Кейс 5. \tВыдача заключения о наличии/отсутствии заболеваний препятствующих исполнению служебных обязанностей",
      "item": [
        {
          "name": "импорт пакета медицинской информации",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "pm.test(\"Валидный бандл должен отработать со статусом 202\", function () {\r",
                  "    pm.response.to.have.status(202);\r",
                  "});\r",
                  "\r",
                  "var jsonData = pm.response.json();\r",
                  "let bundleId = jsonData.parameter.find(obj => obj.name === \"ResourceId\").valueString;\r",
                  "let statusReference = jsonData.parameter.find(obj => obj.name === \"OperationStatusReference\");\r",
                  "\r",
                  "console.log(statusReference.valueReference.reference);\r",
                  "\r",
                  "pm.collectionVariables.set(\"bundleId\", bundleId);\r",
                  "pm.collectionVariables.set(\"StatusUrl\", statusReference.valueReference.reference);\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            },
            {
              "listen": "prerequest",
              "script": {
                "exec": [
                  "// const iehrTools = pm.require('@grey-escape-331258/iehr-tools');\r",
                  "\r",
                  "// var requestdata = JSON.parse(pm.request.body.raw);\r",
                  "// let patient = requestdata.entry.find(obj => obj.resource.resourceType === \"Patient\").resource;\r",
                  "// let composition = requestdata.entry.filter(obj => obj.resource.resourceType === \"Composition\")[0].resource;\r",
                  "\r",
                  "// let actualDate = new Date(Date.parse(composition.date.substr(0, 7)));\r",
                  "// let actualDateStart = iehrTools.addMonth(actualDate, -1);\r",
                  "// let actualDateEnd = iehrTools.addMonth(actualDate, 1);\r",
                  "\r",
                  "// pm.collectionVariables.set(\"actualDateStart\", actualDateStart.toISOString().substring(0,7));\r",
                  "// pm.collectionVariables.set(\"actualDateEnd\", actualDateEnd.toISOString().substring(0,7));\r",
                  "// pm.collectionVariables.set(\"actualDate\", actualDate.toISOString().substring(0,10));\r",
                  "// // --- Patient ----\r",
                  "// let patientName = patient.name[0].family;\r",
                  "// let patientDate = patient.birthDate;\r",
                  "// let patientAddress = patient.address[0];\r",
                  "// let patientIdentifier = patient.identifier[0];\r",
                  "\r",
                  "// console.log(pm.request.auth)\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Fhir-By-Version",
                "value": "active",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\r\n    \"resourceType\": \"Bundle\",\r\n    \"id\": \"ExampleBundleWeaponOwnershipTest\",\r\n    \"meta\": {\r\n        \"profile\": [\r\n            \"https://fhir.by/AbstractArea/StructureDefinition/Bundle/MedicationDocument\"\r\n        ]\r\n    },\r\n    \"identifier\": {\r\n        \"system\": \"https://fhir.by/ValueSet/urn:ietf:rfc:3986\",\r\n        \"value\": \"{{$guid}}\"\r\n    },\r\n    \"type\": \"document\",\r\n    \"timestamp\": \"2025-12-10T14:00:00Z\",\r\n    \"entry\": [\r\n        {\r\n            \"fullUrl\": \"Composition/CompositionWeaponOwnershipTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Composition\",\r\n                \"id\": \"CompositionWeaponOwnershipTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/CompDocument\"\r\n                    ]\r\n                },\r\n                \"status\": \"final\",\r\n                \"type\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/CompositionType\",\r\n                            \"code\": \"general\",\r\n                            \"display\": \"Общая медицинская информация\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": [\r\n                    {\r\n                        \"reference\": \"Patient/PatientTest\"\r\n                    }\r\n                ],\r\n                \"date\": \"2025-12-10T14:00:00Z\",\r\n                \"author\": [\r\n                    {\r\n                        \"reference\": \"Practitioner/{{PractitionerId}}\"\r\n                    }\r\n                ],\r\n                \"title\": \"CompDocument для наполненного Bundle для заключения, подтверждающее отсутствие (наличие) заболеваний и физических недостатков, включенных в перечень заболеваний и физических недостатков граждан, при наличии которых противопоказано владение оружием\",\r\n                \"custodian\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                }\r\n               \r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Patient/PatientTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Patient\",\r\n                \"id\": \"PatientTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/PatientWithIdentificationNumber\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/IncapacityExtension\",\r\n                        \"valueBoolean\": true\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DisabilityGroup\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/DisabilityGroup\",\r\n                                    \"code\": \"2_group\",\r\n                                    \"display\": \"II группа\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DisabilityReason\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/DisabilityReason\",\r\n                                    \"code\": \"general\",\r\n                                    \"display\": \"общее заболевание\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobProfession\",\r\n                                \"valueString\": \"Инспектор по контролю за содержанием и охране зеленых насаждений\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobProfessionCode\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/SpecialtyProfPerson\",\r\n                                            \"code\": \"3119-007\",\r\n                                            \"display\": \"Инспектор по контролю за содержанием и охране зеленых насаждений\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobPlace\",\r\n                                \"valueString\": \"УП «Зеленстрой»\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/TermOFWork\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2020-11-07\"\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/MainJobPlace\",\r\n                                \"valueBoolean\": true\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientJob\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataBoolean\",\r\n                                \"valueBoolean\": true\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataPeriod\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2025-01-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalData\"\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"INP\",\r\n                                    \"display\": \"Уникальный идентификационный номер\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"7551027A009PB6\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedString\",\r\n                                        \"valueString\": \"Центральным РУВД г Минска, 21.08.2021\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedDate\",\r\n                                        \"valueDate\": \"2021-08-21\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedCode\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/OCAM\",\r\n                                                    \"code\": \"710\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PassportIssued\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"Passport-RB\",\r\n                                    \"display\": \"Паспорт гражданина Республики Беларусь\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"MP2334561\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedDate\",\r\n                                        \"valueDate\": \"2024-03-01\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedString\",\r\n                                        \"valueString\": \"Центральным МРЭК г Минска, 31.01.2024\"\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PassportIssued\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"official\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"CDP\",\r\n                                    \"display\": \"Удостоверение инвалида\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"Серия 09 №1234562\",\r\n                        \"period\": {\r\n                            \"start\": \"2024-02-15\"\r\n                        },\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedDate\",\r\n                                        \"valueDate\": \"1990-12-31\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedString\",\r\n                                        \"valueString\": \"Октябрьское РУВД г.Минска\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedCode\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/OCAM\",\r\n                                                    \"code\": \"705\",\r\n                                                    \"display\": \"Октябрьское РУВД г.Минска\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PassportIssued\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"BC\",\r\n                                    \"display\": \"Свидетельство о рождении\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"АВ7654322\"\r\n                    }\r\n                ],\r\n                \"active\": true,\r\n                \"name\": [\r\n                    {\r\n                        \"family\": \"Иванов\",\r\n                        \"given\": [\r\n                            \"Петр\",\r\n                            \"Сидорович\"\r\n                        ]\r\n                    }\r\n                ],\r\n                \"telecom\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientNotificationType\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/PatientNotificationType\",\r\n                                                    \"code\": \"SMS\",\r\n                                                    \"display\": \"SMS\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientNotificationType\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/PatientNotificationType\",\r\n                                                    \"code\": \"messenger-tel\",\r\n                                                    \"display\": \"Telegram\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientNotificationType\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/PatientNotificationType\",\r\n                                                    \"code\": \"e-mail\",\r\n                                                    \"display\": \"e-mail\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientConsentForNotification\",\r\n                                        \"valueBoolean\": true\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientAccountPoint\",\r\n                                        \"valueBoolean\": true\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientTelecomPurpose\"\r\n                            }\r\n                        ],\r\n                        \"system\": \"phone\",\r\n                        \"value\": \"295748410\"\r\n                    },\r\n                    {\r\n                        \"system\": \"email\",\r\n                        \"value\": \"test_mail@gmail.by\"\r\n                    }\r\n                ],\r\n                \"gender\": \"male\",\r\n                \"birthDate\": \"1990-12-31\",\r\n                \"deceasedBoolean\": false,\r\n                \"address\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"code\": \"5170309411\",\r\n                                            \"display\": \"Улица Золотая Горка\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 29\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"home\",\r\n                        \"text\": \"г.Минск, Улица Золотая Горка, д.5, кв.29\",\r\n                        \"postalCode\": \"220022\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"code\": \"51703019678\",\r\n                                            \"display\": \"Проспект Рокоссовского\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 2\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"temp\",\r\n                        \"text\": \"г.Минск, Проспект Рокоссовского, д.20, кв.2\",\r\n                        \"postalCode\": \"220011\"\r\n                    }\r\n                ],\r\n                \"maritalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/MaritalStatus\",\r\n                            \"code\": \"married\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"contact\": [\r\n                    {\r\n                        \"relationship\": [\r\n                            {\r\n                                \"coding\": [\r\n                                    {\r\n                                        \"system\": \"https://fhir.by/ValueSet/RelatedPersonType\",\r\n                                        \"code\": \"wife\"\r\n                                    }\r\n                                ]\r\n                            }\r\n                        ],\r\n                        \"name\": {\r\n                            \"family\": \"Иванова\",\r\n                            \"given\": [\r\n                                \"Лариса\",\r\n                                \"Ивановна\"\r\n                            ]\r\n                        },\r\n                        \"telecom\": [\r\n                            {\r\n                                \"system\": \"phone\",\r\n                                \"value\": \"802990990908\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"generalPractitioner\": [\r\n                    {\r\n                        \"reference\": \"Organization/{{OrganizationId}}\",\r\n                        \"identifier\": {\r\n                            \"value\": \"123156789012\",\r\n                            \"period\": {\r\n                                \"start\": \"2002-12-11\"\r\n                            }\r\n                        }\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"ClinicalImpression/ExampleMilitaryTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"ClinicalImpression\",\r\n                \"id\": \"ExampleMilitaryTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/MedAssessmentMilitary\"\r\n                    ]\r\n                },\r\n                \"identifier\": [\r\n                    {\r\n                        \"value\": \"2243335\",\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"status\": \"completed\",\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/PatientTest\"\r\n                },\r\n                \"effectivePeriod\": {\r\n                    \"start\": \"2024-11-28T12:00:00Z\",\r\n                    \"end\": \"2025-11-27T12:00:00Z\"\r\n                },\r\n                \"date\": \"2024-11-28\",\r\n                \"performer\": {\r\n                    \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                },\r\n                \"prognosisCodeableConcept\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/ConclusionForMilitary\",\r\n                                \"code\": \"no_contraindications\",\r\n                                \"display\": \"Отсутствуют заболевания, входящие в определенный Советом Министров Республики Беларусь перечень заболеваний, препятствующих исполнению служебных обязанностей на гражданской службе и работе с государственными секретами\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        }\r\n    ]\r\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/$import",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "$import"
              ]
            }
          },
          "response": []
        },
        {
          "name": "получение статуса импорта пакета медицинской информации",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  ""
                ],
                "type": "text/javascript",
                "packages": {}
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/{{bundleId}}/$status",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "{{bundleId}}",
                "$status"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Проверка наличия ресурса MedAssessmentMilitary",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          },
          "request": {
            "method": "GET",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/ClinicalImpression?_profile=https://fhir.by/StructureDefinition/MedAssessmentMilitary&patient={{patientId}}&_sort=-_lastUpdated",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Patient",
                "{{patientId}}",
                "ClinicalImpression"
              ],
              "query": [
                {
                  "key": "_profile",
                  "value": "https://fhir.by/StructureDefinition/MedAssessmentMilitary"
                },
                {
                  "key": "patient",
                  "value": "{{patientId}}"
                },
                {
                  "key": "_sort",
                  "value": "-_lastUpdated"
                }
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Кейс 6. \t\tВыдача заключения о наличии/отсутствии медицинских противопоказаний для работы на морских судах",
      "item": [
        {
          "name": "импорт пакета медицинской информации",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "pm.test(\"Валидный бандл должен отработать со статусом 202\", function () {\r",
                  "    pm.response.to.have.status(202);\r",
                  "});\r",
                  "\r",
                  "var jsonData = pm.response.json();\r",
                  "let bundleId = jsonData.parameter.find(obj => obj.name === \"ResourceId\").valueString;\r",
                  "let statusReference = jsonData.parameter.find(obj => obj.name === \"OperationStatusReference\");\r",
                  "\r",
                  "console.log(statusReference.valueReference.reference);\r",
                  "\r",
                  "pm.collectionVariables.set(\"bundleId\", bundleId);\r",
                  "pm.collectionVariables.set(\"StatusUrl\", statusReference.valueReference.reference);\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            },
            {
              "listen": "prerequest",
              "script": {
                "exec": [
                  "// const iehrTools = pm.require('@grey-escape-331258/iehr-tools');\r",
                  "\r",
                  "// var requestdata = JSON.parse(pm.request.body.raw);\r",
                  "// let patient = requestdata.entry.find(obj => obj.resource.resourceType === \"Patient\").resource;\r",
                  "// let composition = requestdata.entry.filter(obj => obj.resource.resourceType === \"Composition\")[0].resource;\r",
                  "\r",
                  "// let actualDate = new Date(Date.parse(composition.date.substr(0, 7)));\r",
                  "// let actualDateStart = iehrTools.addMonth(actualDate, -1);\r",
                  "// let actualDateEnd = iehrTools.addMonth(actualDate, 1);\r",
                  "\r",
                  "// pm.collectionVariables.set(\"actualDateStart\", actualDateStart.toISOString().substring(0,7));\r",
                  "// pm.collectionVariables.set(\"actualDateEnd\", actualDateEnd.toISOString().substring(0,7));\r",
                  "// pm.collectionVariables.set(\"actualDate\", actualDate.toISOString().substring(0,10));\r",
                  "// // --- Patient ----\r",
                  "// let patientName = patient.name[0].family;\r",
                  "// let patientDate = patient.birthDate;\r",
                  "// let patientAddress = patient.address[0];\r",
                  "// let patientIdentifier = patient.identifier[0];\r",
                  "\r",
                  "// console.log(pm.request.auth)\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Fhir-By-Version",
                "value": "active",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\r\n    \"resourceType\": \"Bundle\",\r\n    \"id\": \"ExampleBundleMarineWorkTest\",\r\n    \"meta\": {\r\n        \"profile\": [\r\n            \"https://fhir.by/AbstractArea/StructureDefinition/Bundle/MedicationDocument\"\r\n        ]\r\n    },\r\n    \"identifier\": {\r\n        \"system\": \"https://fhir.by/ValueSet/urn:ietf:rfc:3986\",\r\n        \"value\": \"{{$guid}}\"\r\n    },\r\n    \"type\": \"document\",\r\n    \"timestamp\": \"2025-12-10T14:00:00Z\",\r\n    \"entry\": [\r\n        {\r\n            \"fullUrl\": \"Composition/CompositionMarineWorkTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Composition\",\r\n                \"id\": \"CompositionMarineWorkTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/CompDocument\"\r\n                    ]\r\n                },\r\n                \"status\": \"final\",\r\n                \"type\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/CompositionType\",\r\n                            \"code\": \"general\",\r\n                            \"display\": \"Общая медицинская информация\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": [\r\n                    {\r\n                        \"reference\": \"Patient/PatientTest\"\r\n                    }\r\n                ],\r\n                \"date\": \"2025-12-10T14:00:00Z\",\r\n                \"author\": [\r\n                    {\r\n                        \"reference\": \"Practitioner/{{PractitionerId}}\"\r\n                    }\r\n                ],\r\n                \"title\": \"CompDocument для наполненного Bundle для заключения, подтверждающее отсутствие (наличие) медицинских противопоказаний для работы на морских судах, судах внутреннего плавания, судах смешанного (река-море) плавания\",\r\n                \"custodian\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                },\r\n                \"event\": [\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"ClinicalImpression/ExampleMarineWorkTest\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Patient/PatientTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Patient\",\r\n                \"id\": \"PatientTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/PatientWithIdentificationNumber\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/IncapacityExtension\",\r\n                        \"valueBoolean\": true\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DisabilityGroup\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/DisabilityGroup\",\r\n                                    \"code\": \"2_group\",\r\n                                    \"display\": \"II группа\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DisabilityReason\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/DisabilityReason\",\r\n                                    \"code\": \"general\",\r\n                                    \"display\": \"общее заболевание\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobProfession\",\r\n                                \"valueString\": \"Инспектор по контролю за содержанием и охране зеленых насаждений\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobProfessionCode\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/SpecialtyProfPerson\",\r\n                                            \"code\": \"3119-007\",\r\n                                            \"display\": \"Инспектор по контролю за содержанием и охране зеленых насаждений\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobPlace\",\r\n                                \"valueString\": \"УП «Зеленстрой»\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/TermOFWork\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2020-11-07\"\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/MainJobPlace\",\r\n                                \"valueBoolean\": true\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientJob\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataBoolean\",\r\n                                \"valueBoolean\": true\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataPeriod\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2025-01-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalData\"\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"INP\",\r\n                                    \"display\": \"Уникальный идентификационный номер\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"7551027A009PB6\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedString\",\r\n                                        \"valueString\": \"Центральным РУВД г Минска, 21.08.2021\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedDate\",\r\n                                        \"valueDate\": \"2021-08-21\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedCode\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/OCAM\",\r\n                                                    \"code\": \"710\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PassportIssued\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"Passport-RB\",\r\n                                    \"display\": \"Паспорт гражданина Республики Беларусь\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"MP2334561\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedDate\",\r\n                                        \"valueDate\": \"2024-03-01\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedString\",\r\n                                        \"valueString\": \"Центральным МРЭК г Минска, 31.01.2024\"\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PassportIssued\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"official\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"CDP\",\r\n                                    \"display\": \"Удостоверение инвалида\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"Серия 09 №1234562\",\r\n                        \"period\": {\r\n                            \"start\": \"2024-02-15\"\r\n                        },\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedDate\",\r\n                                        \"valueDate\": \"1990-12-31\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedString\",\r\n                                        \"valueString\": \"Октябрьское РУВД г.Минска\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedCode\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/OCAM\",\r\n                                                    \"code\": \"705\",\r\n                                                    \"display\": \"Октябрьское РУВД г.Минска\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PassportIssued\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"BC\",\r\n                                    \"display\": \"Свидетельство о рождении\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"АВ7654322\"\r\n                    }\r\n                ],\r\n                \"active\": true,\r\n                \"name\": [\r\n                    {\r\n                        \"family\": \"Иванов\",\r\n                        \"given\": [\r\n                            \"Петр\",\r\n                            \"Сидорович\"\r\n                        ]\r\n                    }\r\n                ],\r\n                \"telecom\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientNotificationType\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/PatientNotificationType\",\r\n                                                    \"code\": \"SMS\",\r\n                                                    \"display\": \"SMS\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientNotificationType\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/PatientNotificationType\",\r\n                                                    \"code\": \"messenger-tel\",\r\n                                                    \"display\": \"Telegram\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientNotificationType\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/PatientNotificationType\",\r\n                                                    \"code\": \"e-mail\",\r\n                                                    \"display\": \"e-mail\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientConsentForNotification\",\r\n                                        \"valueBoolean\": true\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientAccountPoint\",\r\n                                        \"valueBoolean\": true\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientTelecomPurpose\"\r\n                            }\r\n                        ],\r\n                        \"system\": \"phone\",\r\n                        \"value\": \"295748410\"\r\n                    },\r\n                    {\r\n                        \"system\": \"email\",\r\n                        \"value\": \"test_mail@gmail.by\"\r\n                    }\r\n                ],\r\n                \"gender\": \"male\",\r\n                \"birthDate\": \"1990-12-31\",\r\n                \"deceasedBoolean\": false,\r\n                \"address\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"code\": \"5170309411\",\r\n                                            \"display\": \"Улица Золотая Горка\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 29\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"home\",\r\n                        \"text\": \"г.Минск, Улица Золотая Горка, д.5, кв.29\",\r\n                        \"postalCode\": \"220022\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"code\": \"51703019678\",\r\n                                            \"display\": \"Проспект Рокоссовского\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 2\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"temp\",\r\n                        \"text\": \"г.Минск, Проспект Рокоссовского, д.20, кв.2\",\r\n                        \"postalCode\": \"220011\"\r\n                    }\r\n                ],\r\n                \"maritalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/MaritalStatus\",\r\n                            \"code\": \"married\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"contact\": [\r\n                    {\r\n                        \"relationship\": [\r\n                            {\r\n                                \"coding\": [\r\n                                    {\r\n                                        \"system\": \"https://fhir.by/ValueSet/RelatedPersonType\",\r\n                                        \"code\": \"wife\"\r\n                                    }\r\n                                ]\r\n                            }\r\n                        ],\r\n                        \"name\": {\r\n                            \"family\": \"Иванова\",\r\n                            \"given\": [\r\n                                \"Лариса\",\r\n                                \"Ивановна\"\r\n                            ]\r\n                        },\r\n                        \"telecom\": [\r\n                            {\r\n                                \"system\": \"phone\",\r\n                                \"value\": \"802990990908\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"generalPractitioner\": [\r\n                    {\r\n                        \"reference\": \"Organization/{{OrganizationId}}\",\r\n                        \"identifier\": {\r\n                            \"value\": \"123156789012\",\r\n                            \"period\": {\r\n                                \"start\": \"2002-12-11\"\r\n                            }\r\n                        }\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"ClinicalImpression/ExampleMarineWorkTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"ClinicalImpression\",\r\n                \"id\": \"ExampleMarineWorkTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/MedAssessmentMarineWork\"\r\n                    ]\r\n                },\r\n                \"identifier\": [\r\n                    {\r\n                        \"value\": \"224338635\",\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"status\": \"completed\",\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/PatientTest\"\r\n                },\r\n                \"effectivePeriod\": {\r\n                    \"start\": \"2024-11-28T12:00:00Z\",\r\n                    \"end\": \"2026-12-10T14:00:00Z\"\r\n                },\r\n                \"date\": \"2025-12-10\",\r\n                \"performer\": {\r\n                    \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                },\r\n                \"prognosisCodeableConcept\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/MarineWork\",\r\n                                \"code\": \"tropical_climate_contraindications\",\r\n                                \"display\": \"Имеются медицинские противопоказания для работы на судне при плавании судна в районах с жарким тропическим климатом\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        }\r\n    ]\r\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/$import",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "$import"
              ]
            }
          },
          "response": []
        },
        {
          "name": "получение статуса импорта пакета медицинской информации",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  ""
                ],
                "type": "text/javascript",
                "packages": {}
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/{{bundleId}}/$status",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "{{bundleId}}",
                "$status"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Проверка наличия ресурса MedAssessmentMarineWork",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          },
          "request": {
            "method": "GET",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/ClinicalImpression?_profile=https://fhir.by/StructureDefinition/MedAssessmentMarineWork&patient={{patientId}}&_sort=-_lastUpdated",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Patient",
                "{{patientId}}",
                "ClinicalImpression"
              ],
              "query": [
                {
                  "key": "_profile",
                  "value": "https://fhir.by/StructureDefinition/MedAssessmentMarineWork"
                },
                {
                  "key": "patient",
                  "value": "{{patientId}}"
                },
                {
                  "key": "_sort",
                  "value": "-_lastUpdated"
                }
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Кейс 7. \tВыдача заключения о наличии/отсутствии иных заболеваний (состояний) в случаях, установленных законодательными актами",
      "item": [
        {
          "name": "импорт пакета медицинской информации",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "pm.test(\"Валидный бандл должен отработать со статусом 202\", function () {\r",
                  "    pm.response.to.have.status(202);\r",
                  "});\r",
                  "\r",
                  "var jsonData = pm.response.json();\r",
                  "let bundleId = jsonData.parameter.find(obj => obj.name === \"ResourceId\").valueString;\r",
                  "let statusReference = jsonData.parameter.find(obj => obj.name === \"OperationStatusReference\");\r",
                  "\r",
                  "console.log(statusReference.valueReference.reference);\r",
                  "\r",
                  "pm.collectionVariables.set(\"bundleId\", bundleId);\r",
                  "pm.collectionVariables.set(\"StatusUrl\", statusReference.valueReference.reference);\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            },
            {
              "listen": "prerequest",
              "script": {
                "exec": [
                  "// const iehrTools = pm.require('@grey-escape-331258/iehr-tools');\r",
                  "\r",
                  "// var requestdata = JSON.parse(pm.request.body.raw);\r",
                  "// let patient = requestdata.entry.find(obj => obj.resource.resourceType === \"Patient\").resource;\r",
                  "// let composition = requestdata.entry.filter(obj => obj.resource.resourceType === \"Composition\")[0].resource;\r",
                  "\r",
                  "// let actualDate = new Date(Date.parse(composition.date.substr(0, 7)));\r",
                  "// let actualDateStart = iehrTools.addMonth(actualDate, -1);\r",
                  "// let actualDateEnd = iehrTools.addMonth(actualDate, 1);\r",
                  "\r",
                  "// pm.collectionVariables.set(\"actualDateStart\", actualDateStart.toISOString().substring(0,7));\r",
                  "// pm.collectionVariables.set(\"actualDateEnd\", actualDateEnd.toISOString().substring(0,7));\r",
                  "// pm.collectionVariables.set(\"actualDate\", actualDate.toISOString().substring(0,10));\r",
                  "// // --- Patient ----\r",
                  "// let patientName = patient.name[0].family;\r",
                  "// let patientDate = patient.birthDate;\r",
                  "// let patientAddress = patient.address[0];\r",
                  "// let patientIdentifier = patient.identifier[0];\r",
                  "\r",
                  "// console.log(pm.request.auth)\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "X-Fhir-By-Version",
                "value": "active",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\r\n    \"resourceType\": \"Bundle\",\r\n    \"id\": \"ExampleBundleCommonTest\",\r\n    \"meta\": {\r\n        \"profile\": [\r\n            \"https://fhir.by/AbstractArea/StructureDefinition/Bundle/MedicationDocument\"\r\n        ]\r\n    },\r\n    \"identifier\": {\r\n        \"system\": \"https://fhir.by/ValueSet/urn:ietf:rfc:3986\",\r\n        \"value\": \"{{$guid}}\"\r\n    },\r\n    \"type\": \"document\",\r\n    \"timestamp\": \"2025-12-10T14:00:00Z\",\r\n    \"entry\": [\r\n        {\r\n            \"fullUrl\": \"Composition/CompositionCommonTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Composition\",\r\n                \"id\": \"CompositionCommonTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/CompDocument\"\r\n                    ]\r\n                },\r\n                \"status\": \"final\",\r\n                \"type\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/CompositionType\",\r\n                            \"code\": \"general\",\r\n                            \"display\": \"Общая медицинская информация\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": [\r\n                    {\r\n                        \"reference\": \"Patient/PatientTest\"\r\n                    }\r\n                ],\r\n                \"date\": \"2025-12-10T14:00:00Z\",\r\n                \"author\": [\r\n                    {\r\n                        \"reference\": \"Practitioner/{{PractitionerId}}\"\r\n                    }\r\n                ],\r\n                \"title\": \"CompDocument для наполненного Bundle для заключения, подтверждающее отсутствие (наличие) иных заболеваний (состояний) в случаях, установленных законодательными актами\",\r\n                \"custodian\": {\r\n                    \"reference\": \"Organization/{{OrganizationId}}\"\r\n                },\r\n                \"event\": [\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"ClinicalImpression/ExampleCommonTest\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    },\r\n                    {\r\n                        \"detail\": [\r\n                            {\r\n                                \"reference\": {\r\n                                    \"reference\": \"Condition/DiabetTest\"\r\n                                }\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Patient/PatientTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Patient\",\r\n                \"id\": \"PatientTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/PatientWithIdentificationNumber\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/IncapacityExtension\",\r\n                        \"valueBoolean\": true\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DisabilityGroup\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/DisabilityGroup\",\r\n                                    \"code\": \"2_group\",\r\n                                    \"display\": \"II группа\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/DisabilityReason\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/DisabilityReason\",\r\n                                    \"code\": \"general\",\r\n                                    \"display\": \"общее заболевание\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobProfession\",\r\n                                \"valueString\": \"Инспектор по контролю за содержанием и охране зеленых насаждений\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobProfessionCode\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/SpecialtyProfPerson\",\r\n                                            \"code\": \"3119-007\",\r\n                                            \"display\": \"Инспектор по контролю за содержанием и охране зеленых насаждений\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientJobPlace\",\r\n                                \"valueString\": \"УП «Зеленстрой»\"\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/TermOFWork\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2020-11-07\"\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/MainJobPlace\",\r\n                                \"valueBoolean\": true\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/PatientJob\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataBoolean\",\r\n                                \"valueBoolean\": true\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalDataPeriod\",\r\n                                \"valuePeriod\": {\r\n                                    \"start\": \"2025-01-01\"\r\n                                }\r\n                            }\r\n                        ],\r\n                        \"url\": \"https://fhir.by/StructureDefinition/ConsentPersonalData\"\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"INP\",\r\n                                    \"display\": \"Уникальный идентификационный номер\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"7551027A009PB6\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedString\",\r\n                                        \"valueString\": \"Центральным РУВД г Минска, 21.08.2021\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedDate\",\r\n                                        \"valueDate\": \"2021-08-21\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedCode\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/OCAM\",\r\n                                                    \"code\": \"710\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PassportIssued\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"Passport-RB\",\r\n                                    \"display\": \"Паспорт гражданина Республики Беларусь\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"MP2334561\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedDate\",\r\n                                        \"valueDate\": \"2024-03-01\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedString\",\r\n                                        \"valueString\": \"Центральным МРЭК г Минска, 31.01.2024\"\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PassportIssued\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"official\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"CDP\",\r\n                                    \"display\": \"Удостоверение инвалида\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"Серия 09 №1234562\",\r\n                        \"period\": {\r\n                            \"start\": \"2024-02-15\"\r\n                        },\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedDate\",\r\n                                        \"valueDate\": \"1990-12-31\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedString\",\r\n                                        \"valueString\": \"Октябрьское РУВД г.Минска\"\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PassportIssuedCode\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/OCAM\",\r\n                                                    \"code\": \"705\",\r\n                                                    \"display\": \"Октябрьское РУВД г.Минска\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PassportIssued\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"usual\",\r\n                        \"type\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/PersonalDocumentType\",\r\n                                    \"code\": \"BC\",\r\n                                    \"display\": \"Свидетельство о рождении\"\r\n                                }\r\n                            ]\r\n                        },\r\n                        \"value\": \"АВ7654322\"\r\n                    }\r\n                ],\r\n                \"active\": true,\r\n                \"name\": [\r\n                    {\r\n                        \"family\": \"Иванов\",\r\n                        \"given\": [\r\n                            \"Петр\",\r\n                            \"Сидорович\"\r\n                        ]\r\n                    }\r\n                ],\r\n                \"telecom\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"extension\": [\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientNotificationType\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/PatientNotificationType\",\r\n                                                    \"code\": \"SMS\",\r\n                                                    \"display\": \"SMS\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientNotificationType\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/PatientNotificationType\",\r\n                                                    \"code\": \"messenger-tel\",\r\n                                                    \"display\": \"Telegram\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientNotificationType\",\r\n                                        \"valueCodeableConcept\": {\r\n                                            \"coding\": [\r\n                                                {\r\n                                                    \"system\": \"https://fhir.by/ValueSet/PatientNotificationType\",\r\n                                                    \"code\": \"e-mail\",\r\n                                                    \"display\": \"e-mail\"\r\n                                                }\r\n                                            ]\r\n                                        }\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientConsentForNotification\",\r\n                                        \"valueBoolean\": true\r\n                                    },\r\n                                    {\r\n                                        \"url\": \"https://fhir.by/StructureDefinition/PatientAccountPoint\",\r\n                                        \"valueBoolean\": true\r\n                                    }\r\n                                ],\r\n                                \"url\": \"https://fhir.by/StructureDefinition/PatientTelecomPurpose\"\r\n                            }\r\n                        ],\r\n                        \"system\": \"phone\",\r\n                        \"value\": \"295748410\"\r\n                    },\r\n                    {\r\n                        \"system\": \"email\",\r\n                        \"value\": \"test_mail@gmail.by\"\r\n                    }\r\n                ],\r\n                \"gender\": \"male\",\r\n                \"birthDate\": \"1990-12-31\",\r\n                \"deceasedBoolean\": false,\r\n                \"address\": [\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"code\": \"5170309411\",\r\n                                            \"display\": \"Улица Золотая Горка\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 29\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"home\",\r\n                        \"text\": \"г.Минск, Улица Золотая Горка, д.5, кв.29\",\r\n                        \"postalCode\": \"220022\"\r\n                    },\r\n                    {\r\n                        \"extension\": [\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/CoutryForAddresses\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/CitizenshipCode\",\r\n                                            \"code\": \"BY\",\r\n                                            \"display\": \"Беларусь\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/StreetGeoRegistry\",\r\n                                \"valueCodeableConcept\": {\r\n                                    \"coding\": [\r\n                                        {\r\n                                            \"system\": \"https://fhir.by/ValueSet/StreetGeoRegistry\",\r\n                                            \"code\": \"51703019678\",\r\n                                            \"display\": \"Проспект Рокоссовского\"\r\n                                        }\r\n                                    ]\r\n                                }\r\n                            },\r\n                            {\r\n                                \"url\": \"https://fhir.by/StructureDefinition/ApartmentRoom\",\r\n                                \"valueString\": \"кв. 2\"\r\n                            }\r\n                        ],\r\n                        \"use\": \"temp\",\r\n                        \"text\": \"г.Минск, Проспект Рокоссовского, д.20, кв.2\",\r\n                        \"postalCode\": \"220011\"\r\n                    }\r\n                ],\r\n                \"maritalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/MaritalStatus\",\r\n                            \"code\": \"married\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"contact\": [\r\n                    {\r\n                        \"relationship\": [\r\n                            {\r\n                                \"coding\": [\r\n                                    {\r\n                                        \"system\": \"https://fhir.by/ValueSet/RelatedPersonType\",\r\n                                        \"code\": \"wife\"\r\n                                    }\r\n                                ]\r\n                            }\r\n                        ],\r\n                        \"name\": {\r\n                            \"family\": \"Иванова\",\r\n                            \"given\": [\r\n                                \"Лариса\",\r\n                                \"Ивановна\"\r\n                            ]\r\n                        },\r\n                        \"telecom\": [\r\n                            {\r\n                                \"system\": \"phone\",\r\n                                \"value\": \"802990990908\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ],\r\n                \"generalPractitioner\": [\r\n                    {\r\n                        \"reference\": \"Organization/{{OrganizationId}}\",\r\n                        \"identifier\": {\r\n                            \"value\": \"123156789012\",\r\n                            \"period\": {\r\n                                \"start\": \"2002-12-11\"\r\n                            }\r\n                        }\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"Condition/DiabetTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"Condition\",\r\n                \"id\": \"DiabetTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/FinalDiagnosis\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/KindOfDiagnosis\",\r\n                        \"valueCodeableConcept\": {\r\n                            \"coding\": [\r\n                                {\r\n                                    \"system\": \"https://fhir.by/ValueSet/KindOfDiagnosisCode\",\r\n                                    \"code\": \"Final\"\r\n                                }\r\n                            ]\r\n                        }\r\n                    },\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/AssertedDate\",\r\n                        \"valueDateTime\": \"2024-11-15T10:12:00Z\"\r\n                    }\r\n                ],\r\n                \"clinicalStatus\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"http://terminology.hl7.org/CodeSystem/condition-clinical\",\r\n                            \"code\": \"active\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"code\": {\r\n                    \"coding\": [\r\n                        {\r\n                            \"system\": \"https://fhir.by/ValueSet/InternClassificDiseases10\",\r\n                            \"code\": \"E10.2\",\r\n                            \"display\": \"E10.2 - Инсулинзависимый сахарный диабет с поражением почек\"\r\n                        }\r\n                    ]\r\n                },\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/PatientTest\"\r\n                },\r\n                \"onsetDateTime\": \"2024-11-15\",\r\n                \"recordedDate\": \"2024-11-15\",\r\n                \"participant\": [\r\n                    {\r\n                        \"actor\": {\r\n                            \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                        }\r\n                    }\r\n                ]\r\n            }\r\n        },\r\n        {\r\n            \"fullUrl\": \"ClinicalImpression/ExampleCommonTest\",\r\n            \"resource\": {\r\n                \"resourceType\": \"ClinicalImpression\",\r\n                \"id\": \"ExampleCommonTest\",\r\n                \"meta\": {\r\n                    \"profile\": [\r\n                        \"https://fhir.by/StructureDefinition/MedAssessmentCommon\"\r\n                    ]\r\n                },\r\n                \"extension\": [\r\n                    {\r\n                        \"url\": \"https://fhir.by/StructureDefinition/LegislativeAct\",\r\n                        \"valueString\": \"Постановление МЗ РБ от 25.07.2022 N 72 (ред. от 29.11.2024) Об установлении перечней заболеваний приложение 2, п 4.1\"\r\n                    }\r\n                ],\r\n                \"identifier\": [\r\n                    {\r\n                        \"value\": \"22005\",\r\n                        \"assigner\": {\r\n                            \"reference\": \"Organization/{{OrganizationId}}\"\r\n                        }\r\n                    }\r\n                ],\r\n                \"status\": \"completed\",\r\n                \"subject\": {\r\n                    \"reference\": \"Patient/PatientTest\"\r\n                },\r\n                \"effectivePeriod\": {\r\n                    \"start\": \"2024-11-28T12:00:00Z\",\r\n                    \"end\": \"2026-12-10T14:00:00Z\"\r\n                },\r\n                \"date\": \"2025-12-10\",\r\n                \"performer\": {\r\n                    \"reference\": \"PractitionerRole/{{PractitionerRole}}\"\r\n                },\r\n                \"problem\": [\r\n                    {\r\n                        \"reference\": \"Condition/DiabetTest\"\r\n                    }\r\n                ],\r\n                \"prognosisCodeableConcept\": [\r\n                    {\r\n                        \"coding\": [\r\n                            {\r\n                                \"system\": \"https://fhir.by/ValueSet/ConclusionForCommonMedAssessment\",\r\n                                \"code\": \"diseases\",\r\n                                \"display\": \"Имеются заболевания (состояния), установленные законодательными актами\"\r\n                            }\r\n                        ]\r\n                    }\r\n                ]\r\n            }\r\n        }\r\n    ]\r\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/$import",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "$import"
              ]
            }
          },
          "response": []
        },
        {
          "name": "получение статуса импорта пакета медицинской информации",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  ""
                ],
                "type": "text/javascript",
                "packages": {}
              }
            }
          ],
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Bundle/{{bundleId}}/$status",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Bundle",
                "{{bundleId}}",
                "$status"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Проверка наличия ресурса MedAssessmentCommon",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "\r",
                  ""
                ],
                "type": "text/javascript",
                "packages": {},
                "requests": {}
              }
            }
          ],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          },
          "request": {
            "method": "GET",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{Schema}}://{{Proxy-host}}/fhir/Patient/{{patientId}}/ClinicalImpression?_profile=https://fhir.by/StructureDefinition/MedAssessmentCommon&patient={{patientId}}&_sort=-_lastUpdated",
              "protocol": "{{Schema}}",
              "host": [
                "{{Proxy-host}}"
              ],
              "path": [
                "fhir",
                "Patient",
                "{{patientId}}",
                "ClinicalImpression"
              ],
              "query": [
                {
                  "key": "_profile",
                  "value": "https://fhir.by/StructureDefinition/MedAssessmentCommon"
                },
                {
                  "key": "patient",
                  "value": "{{patientId}}"
                },
                {
                  "key": "_sort",
                  "value": "-_lastUpdated"
                }
              ]
            }
          },
          "response": []
        }
      ]
    }
  ],
  "auth": {
    "type": "oauth2",
    "oauth2": [
      {
        "key": "redirect_uri",
        "value": "https://oauth.pstmn.io/v1/callback",
        "type": "string"
      },
      {
        "key": "authUrl",
        "value": "https://staging.cisz.by/auth/api/realms/iehr/auth",
        "type": "string"
      },
      {
        "key": "accessTokenUrl",
        "value": "https://staging.cisz.by/auth/api/realms/iehr/token",
        "type": "string"
      },
      {
        "key": "clientId",
        "value": "iehr.swagger.client",
        "type": "string"
      },
      {
        "key": "clientSecret",
        "value": "",
        "type": "string"
      },
      {
        "key": "client_authentication",
        "value": "body",
        "type": "string"
      },
      {
        "key": "tokenRequestParams",
        "value": [
          {
            "key": "origin",
            "value": "https://oauth.pstmn.io/v1/callback",
            "enabled": true,
            "send_as": "request_header"
          }
        ],
        "type": "any"
      },
      {
        "key": "tokenName",
        "value": "token",
        "type": "string"
      },
      {
        "key": "grant_type",
        "value": "authorization_code_with_pkce",
        "type": "string"
      },
      {
        "key": "addTokenTo",
        "value": "header",
        "type": "string"
      }
    ]
  },
  "event": [
    {
      "listen": "prerequest",
      "script": {
        "type": "text/javascript",
        "packages": {},
        "requests": {},
        "exec": [
          ""
        ]
      }
    },
    {
      "listen": "test",
      "script": {
        "type": "text/javascript",
        "packages": {},
        "requests": {},
        "exec": [
          ""
        ]
      }
    }
  ],
  "variable": [
    {
      "key": "patientId",
      "value": ""
    },
    {
      "key": "bundleId",
      "value": ""
    },
    {
      "key": "StatusUrl",
      "value": ""
    }
  ]
}